Avoid static buffer in debug module

Caused issues in threading situations
3 files changed