for issue #5939. I tried following the logic of the existing codebase, meaning that -q will use the debug level.