Logging + rewrite of sqlite provider.