pipe from stdin to child process stdin and an output file