Small changes to write outputs to a file.
Small changes to write output streams to files
Small changes in output streams written now in files.