bugfix: adding console handler before logging that debug logging is enabled.