That's why you write to a computer program that saves the chapter for you. Most word processing programs have an automatic save feature, so that if the computer crashes, it easily picks up from the last save.
Worst case scenario is that you'll have to write it all over again, unfortunately.