Pt the redirect in/error are both stored in string buffers. they should preferably be fetched as inputstreams. as a consequence consoleoutput could be replaced with consoleoperation.