redirect the analysis output into a logfile; minor enhancements