fixed MPI bug in checkpt write