Implemented autosave feature