In a home invasion scenario few would have time to do any of that. If the situation shows that you did in fact use a firearm, how did you, becomes the question. Unsafe storage would be the first of many charges. It would cost several thousand dollars to fight all those charges and in the end, most likely, you'd have to surrender your firearms license and all your firearms would be seized.
I see your point. This reminds of an incident where someone did have time to take these steps. A woman in her eighties had someone try to break into her house, and she called the sheriff's department, and informed the perpetrator that she was doing so. The perpetrator continued to try to break in, and she took a .38, loaded it, and informed the perpetrator that she was armed. In this case, it was enough for the perpetrator to flee.