Added ByteOutputStream so the captured output can be used..