Added support for checkpoints and restarts.