make sure debug messages are only for debug level.