Added ability to log to sqlite3 db