 There's only one way to prevent it. You have to have a rigorous policy on testing of any kind of updates before you deploy them to production system. But in case you actually experience some issue, you have to have redundancy. You have to have a backup system.