(NOT READY) add function to use as goroutine for stdout and stderr pipes