added autosave check