It says in this week’s parsha, Devarim 22:8, “If you build a house, you shall make a fence for your roof, so that you will not place blood in your house if a fallen one falls from it.” The Me’am Loez comments: That when a person is ready to build a new house, at the second the builders begin the construction, he should say, “I am having this house built so as to have a place to live in, and I will thus be able to serve Hashem.” He will then have help from Heaven, and holiness will rest upon the house.
When a person builds a house for the sake of Hashem, it is certain that Hashem will assist him, as it happened during the building of the first Beis HaMikdash in the time of Shlomo HaMelech. Our Chochamim say that the stones for the first Beis HaMikdash miraculously placed themselves in their proper places. Why did Shlomo HaMelech merit this very great miracle? The answer is that Shlomo HaMelech built the first Beis HaMikdash for the sake of Hashem as the pasuk states in Melachim 5:19, “Therefore I have decided to build a House for the Name of Hashem, my G-d.”
So too, if a person says at the time that he commences to build, “I am building this house in order to serve Hashem,” the holy influences will help in a concrete way. Actually, before a person does anything, he should say “I am doing this with Hashem’s help,” and Hashem Himself will then help him. This is what the pasuk means in Mishlei 3:6 “In all your ways know Him, and He will smooth your paths.” This means that one should know Hashem with each and every action he does, because He is the one Who gives you the strength.
When a person merits that the Shechinah rests in his house and on his actions, the powers of impurity will run from him. Whenever there is help from Hashem, the powers of impurity have no permission to effect change. Everything in this house will be protected from any negative influences, in fulfillment of the pasuk as it says in Tehillim 91:10 “No evil will befall you, nor will any plague come near your tent.”
Therefore, if one constantly learns Torah in one’s home, the proximity of the Shechinah keeps things that are unholy from the house. This is also true by a person who learns Torah constantly preventing him from falling into the Yetzer Hara’s trap thus keeping him pure. The lesson is to strengthen learning Torah at home and to keep oneself occupied by having Torah thoughts throughout the day.