|You might want to consider investing in a small UPS. If you buy a good one, it will protect from spikes, brownouts as well as power failures. The following link:|
shows a UPS that is just right for home use. I have 4 of the these at home (my office, my wife's office, my modem/router and my home theater system) and the short battery run time allows one to power devices off gracefully instead of the crashing and burning like yours did...which as you've learned, can cause problems. This is only one of the products they offer for home use so if you're interested, look through all their products for the one that's right for you.
I highly recommend APC products as you can't beat their warranty and I've worked with them for the better part of 20 years and have never had any major issues with their products, or the company in general.
It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.