working logging using sqlite3