Added simple logging for database