Changed output csv writer to average runs