If you’re thinking of lending some money to a friend or family member, you’re certainly not alone – more than 90% of young Americans would do the same, according to a 2013 survey. Common as it is though, this practice can be fraught with difficulties. You’ve probably heard at least one story of someone lending money to an acquaintance they thought they could trust, only to never see that money again.

When loans to friends and family go wrong, it’s not just the money that’s at risk – a bad experience can put an end to a friendship, or create a rift in the family that might take years to heal. To avoid those painful experiences, here are three things you can do whenever you loan money to friends or family to help ensure that nothing goes wrong.

1. Have A Written Agreement

This one’s a must for any transaction. Before handing over a single dollar, sit down and work out the exact terms of the loan. How much? When will it be paid back? What happens if they can’t pay it back by that date? It may be tough to ask these questions, but any friend whose intentions are honest will certainly understand. If they become angry or insulted, back away – these are clear signs that they may be unable or unwilling to pay you back.

Having it all down in writing prevents disagreements later on, and provides you with some limited protection if the worst does come to the worst. Although nobody wants to have to chase their friends or family through the courts to get them to pay back a loan, having something in writing will be a huge asset in your favor if it does unfortunately come down to that.

2. Ask Questions

Don’t be shy about asking what the money is for. Find out from your friend or family member what they plan to spend it on, and why they can’t get a loan from some other source. It may be that there’s a way to avoid the expense altogether, or a more appropriate place to get credit. Quite often when people ask for loans from friends and family they can be in a difficult situation, and they may simply not be thinking straight.

Also ask how they plan on getting together the money to pay you back. If they have no plan and their expenses are spiraling out of control, then a loan from you might not be the best course of action. Instead they may need to consider seeking professional financial advice and making some serious changes in their life. A conversation with you about their options might ultimately be better for them than a loan that would just plunge them deeper into debt.

3. Look After Your Own Finances

When loaning to friends or family, only ever deal in cash. However much you trust the person you’re lending to, handing over a credit card or co-signing on a loan can lead to trouble, and so it’s best to politely decline. Working only with cash means that your credit score won’t be in jeopardy, regardless of what happens.

It’s also a good idea to consider the worst case scenario. If your friend or family member doesn’t pay back the loan, is it going to affect your finances adversely, or put you in a difficult spot? Can you afford to make the loan and deal with an unexpected emergency if one crops up? If not, you may not be in a position to help them out, and the best thing you can do is tell them so. Although nobody wants to say “no” to their loved ones, it’s important to be honest, straightforward, and responsible with your savings.