Use sqlite user schema version to remember state
Add logging for sqlite errors
Set sqlite temp directory explicitly, increase database timeout