Simplify IoHandler by using read() to read all output at once