Added check for debug in consoleLog and also added another variable for checking to see if profiling is enabled