Adding error handling for debugging on heroku.