Fixed bug in new restart file mechanism