I think you just learned that it is NEVER a good idea to type a lengthy piece into a "live" program. The best way is to type it into your favourite word-processor, saving frequently. Then correct it and cut-and-paste it into AB (or whatever). That way you are as immune as you can get from power/computer/software /human failures.