added the if statement for debugging

added to make the console output silent in when debug flag disabled