Added code to create totals files at the same time