As retirement approaches, attorneys recommend that you write a will and get other legal affairs in order.

“A person of any age should have a will, trust, power of attorney, health care surrogate and living will, if they choose to do so,” says Craig Harrison, a partner at Lyons, Beaudry & Harrison, P.A., a Sarasota law firm. “The earlier they have those documents prepared, the better off they are.”

If your legal documents aren’t in order, they may be challenged, possibly resulting in a costly guardianship proceeding, says Harrison, who is board certified in wills, trusts and estates.

“If you are entering into a will or trust at 85, and have diminished capacity, or are making major changes, your documents are more subject to attack than if you went to a lawyer at age 65 and have a long-term estate plan.”

Matthew Barry, an attorney at Lyons, Beaudry & Harrison who specializes in elder law, helps his clients come up with a plan to cover long-term care, ideally while they’re in their 60s.

“One thing we do as elder law attorneys is help clients plan in advance for that possibility,” says Barry, “rather than wait until you or your spouse is in that emergency.”

He recently gave a presentation about long-term care at Friendship Centers, where his law firm is a corporate partner.  One in two people over age 65 will require long-term care, AARP says. The cost now averages $9,000 per month in Florida, according to the state Department of Children and Families.

Long-term care insurance could be an option worth exploring in your 60s, when there’s a better chance you’ll be insurable, Barry says, but the insurance should be used to pay for home health services, assisted living care and skilled nursing care.

Medicaid is the only government program that pays for long-term care. Contrary to what many people may believe, you don’t have to be poor to qualify for Medicaid coverage. Certain assets are allowed, including a home worth up to $500,000.

“Medicaid is an important part of elder law,” says Barry.

Mathew Barry has practiced elder law since graduating from law school five years ago. Craig Harrison has been board certified in wills, trusts and estates since 2010.