- wrapped all database operations in locks due to crashes with multithread access to SQLite