add debugMode setting