add checkpoints and output file