Issue #3: DEBUG level error

- added missing if case for debug
- fixes #3