Added error logging to the db.