Yes, saving to file is usually done in a parallel loop. Same could go for the averaging, but you'll always have to consider ease of programming vs efficiency. If the averaging\processing can be in the main loop, it will be easier. If the file storage is not fast enough, in needs to be in a parallel loop (see producer like structures).