moved pickle dump inside rest and retry (wasn't saving before, back to i=~400 FML)