Debug code

Surrounded debug code with #if _DEBUG