Fix sending STDOUT and STDERR over output channel