Use map-stream to transform streams - code refactor

Hi
I'm not sure about: stdout.setEncoding("utf8");
I think its not even necessary to add it at all.