Write the index files at regular file size
Currently, the index files are written at regular time interval. It should be more efficient to write them at regular file size. As we write all the particles at the first and last time step, most of the data will be contained in two time steps. Thus, it is necessary to ensure that two index files are not written for the same time step.