Changed to use conditional compilation

Uses conditional compilation instead of runtime if statement check.
Hopefully prod doesn't compile with debug flag on.