Moved saveConfig to end, once, and also saved iteration number and lastRunDate