Wrapped debugging output

I wrapped a bit of debug output with an "if debug" to quiet down some very verbose messaging.