improved testing, use of a log file for output.