Added basic error logging to the database.