I second the use of a USP - uninterruptible power supply, AKA battery backup. I have one for each of my sewing machines. When the power goes out, it will switch over to a battery and give me enough time to finish up what I'm doing and shut down the right way.