Turned on/off debugging with flag