When a family member or friend asks to borrow money, the natural instinct is to help those close to you. If you’ve fallen to this instinct, you’ve probably learned that friends and money don’t exactly mix. Knowing how to act in these situations can save you money and grief.

Of course, all loans between family and friends don’t always end in a train wreck. Most loans go relatively smoothly and without trouble when making the transactions. The general rule of thumb is to think twice before lending and use a judgmental rule about the person before lending.

Sometimes the best thing to do is say no; it’s okay to say no. For most people this avoids all conflicts altogether, but as harsh as it sounds, you could offer help in another way.

Here’s what you can do to avoid tense situations about money.

Talk about other options. Money isn’t always the best way to help someone in a situation where they ask for it.

Only lend money you are willing to part with. Chances are that you may never see that money again; be prepared for it. Make sure that lending the money won’t affect you in any way.

Make clear conditions when lending the money. You have a better chance of getting your money back if you are strong and stern about getting it paid back. You can even go as far as to make a payment schedule so that you can get it back in a reasonable time.

Document all transactions and conditions of the loan. Get everything in writing and have them sign it as an agreement between you two in a binding contract. With a simple Google search you can even find pre-drawn contracts for you to print and sign.

If a problem arises, deal with it immediately. You won’t get anything done by being the nice guy; if your debtor gets behind on payments, confront them and keep in constant communication with them to get everything back on track.

If all this sounds like a whirlwind, consider just giving them the money that they need without them having to pay it back. If your friend or family member pays you back, great. If not, then you did a good deed to help out a friend and you could get paid back another way.

And remember, again, it’s okay to just say no.