Calculated class average files and writing CSV to disk