fixed a bug when checking the existence of a checkpoint