Store checkpoint on end

Closes #2