Added debugMode setting