[37b bottom] Mishna: If a corpse is in a house where all the doors are closed (and it has not been decided which door will be used to take the corpse out of), then all are Tamei (impure) as well as all vessels inside the house. If one door was open when the person passed away, then that door alone is Tamei (because this door is assumed to be used) and the rest are Tahor (pure).
T’s lesson: We should always prepare and be ready to do Mitzvos at a moment’s notice. We may never know when an opportunity may come knocking. As the Gemarah shows, if the door was open (and ready to be used for the person) it would have saved much from being contaminated, but if not, all is lost. We should be ready to jump on a mitzvah and keep our doors always open.