Move qDebug enabler to the tom of main.

- Avoids situations where qDebug does not work.