in reply to STDOUT, STDERR sniffer

you can redirect STDOUT and STDERR to seperate files by doing this:
system("app args 1>/tmp/app.stdout 2>/tmp/app.stderr");