Added output stream handler.
Added docstring to message function.