Added checkpointing functionality.
Use optparse to get the options and arguments.
Added a 'checkpoint' option to the schema.