adding bit to put the results in a log file