attempted to re-open stdout and attach it to a log file