Checkpointing works

Added test case