added checkpoint code

allows for simulation checkpointing so large sims can be broken up
into smaller chunks.