Log level checking added