Added a printDEBUG flag, which will be a good idea in general