use IORef instead MVar in debugBufferContent

Should fix 7.6.3