Reset the Flag to write data to disk
Added SPM batch processing code.