in reply to changing STDOUT
There may also be useful advice in this writeup:
Safe cross-platform command execution and capture of STDOUT & STDERR
HTH,