passing in window to self executer for browserify, only allowing output if debug is set to true in localStorage