writing each line of stdout, while good for memory consumption, looks funny as output.  output should not be large so just reading all to memory is fine.