Added support for dchar output range in OutputStream.
Using a mutex for logging now.