Do not close stderr if DEBUG macro is defined.

Cleanup debug output.