Added debug printing

Prints only if in debug mode