Fix checkpoint data not being written to file when restarting simulation