Changed log function a bit

Added one extra log message for invalid log level.