Now uses the consistent ifdef DEBUG rather than if DEBUG==1 to enable output
Now doesn't have filename handling debug enabled