Thread-safe version of OutputCapturer