Modified log message for opening/closing the database, added the basename.
Fixed issues with the log levels.