improved error handling in database module and error log messages will get LogLevel 0 and will always be logged