Added checkpoint mechanism.