Location of db for heroku
Adding some error cases