...
You definitely did the right thing. There was a coldness between you now that he was avoiding talking to you. However, if you had lent him money and he hadn't paid you back, it could have been more than a coldness between you. I think you may have prevented a bigger disaster with this choice. In addition, even banks examine our behavior from an economic point of view when lending to us. You did something perfectly normal and right, as banks do.