If the lock is attacked and keypad knocked off, you can attach an identical keypad to the wires and open the safe with the original code. The code is stored inside the safe lock module in every lock I've seen.
It is common that if an elock fails, the first thing you do is change the batteries...