Add calculation of statistics and write output to file when generating job information