make sure database is created before trying to put things in it