Merged sqlite3 db logging to new branch