add some concurrency protection + noddy autosave