repair checkpoint algorithm in saver