Initial implementation of the autosave plugin