I hate when that happens. Lost a few to similar circumstances myself. Since then I mostly write things out on a google doc and then copy them over, as google docs have a rewind function that lets you recover stuff consistently.