Save and resume progress to/from logfile