Create database unless exists

and improve logging.