Generally we all play Monday morning quarterback and say (in hindsight) that "I would have done this or that given the situation" but we neglect to factor the panic that almost always stops logical thought in its tracks, and derails us from self rescue. We cannot factor that into our water cooler assessments unless you’re the one believing your seconds from death. The ability to stave off panic, logically access, and correct the problem is developed by training, realistic drills and experience. The best answer is to prevent the problem from starting by due diligence in assembly, planning and maintenance but since Murphy loves divers, we must to train for and keep our self rescue skills sharp, whether its bailing out, shutting down, or turning on.
This is so beautifully said that it deserved to be quoted.