Fix scheduler bug in Python 2.6
Honor the --debug option for the logger