use util.log() for debugMode=true instead of console.log()