Reduce SQLite concurrency problems