I treat every file that's important to me the same when I have to edit it, I hit save first, then edit what needs attention. After making any change more then a few minutes of work, hit save. Undo is always the last option.
I am a terribly slow typist, so this is a habit I formed many years ago.