Fixing logging for python>=3.2 and detaching gui logger before shutdown
to get rid of QTimer error message