Redirected some program output to log files

Helps clean up the main stdout and stderr streams such that only the
glue code outputs to those streams.