Switch SQLite to journal_mode=WAL : prevent locking while writing