Fail gracefully if the database cannot be opened