modify file when unsaved