in reply to Redirect to STDOUT and file

I had a similar problem earlier in the year. See How to log all output from a program?