Added support for output streams