Creating empty database and some logging improvement