refactoring of cleanable_query
raised the default logger level to WARN