Make sure the db inits before writing.