Nail fungus tends to affect men more often than women, and is associated with a family history of this infection. Other risk factors include perspiring heavily, being in a humid or moist environment, psoriasis, wearing socks and shoes that hinder ventilation and do not absorb perspiration, going barefoot in damp public places such as swimming pools, gyms and shower rooms, having athlete's foot (tinea pedis), minor skin or nail injury, damaged nail, or other infection, and having diabetes, circulation problems, which may also lead to lower peripheral temperatures on hands and feet, or a weakened immune system. The diagnosis is generally suspected based on the appearance and confirmed by laboratory testing. The four main tests are a potassium hydroxide smear, culture, histology examination, and polymerase chain reaction. The sample examined is generally nail scrapings or clippings. These being from as far up the nail as possible. Nail plate biopsy with periodic acid-Schiff stain appear more useful than culture or direct KOH examination. To reliably identify nondermatophyte molds, several samples may be necessary. There are five classic types of onychomycosis:  In many cases of suspected nail fungus there is actually no fungal infection, but only nail deformity. To avoid misdiagnosis as nail psoriasis, lichen planus, contact dermatitis, nail bed tumors such as melanoma, trauma, or yellow nail syndrome, laboratory confirmation may be necessary. Other conditions that may appear similar to onychomycosis include: psoriasis, normal aging, yellow nail syndrome, and chronic paronychia. Most treatments are with antifungal medications either topically or by mouth. Avoiding use of antifungal therapy by mouth (e.g. terbinafine) in persons without a confirmed infection is recommended because of the possible side effects of that treatment. Topical agents include ciclopirox nail paint, amorolfine, and efinaconazole. Some topical treatments need to be applied daily for prolonged periods (at least 1 year). Topical amorolfine is applied weekly. Topical ciclopirox results in a cure in 6% to 9% of cases; amorolfine might be more effective. Ciclopirox when used with terbinafine appears to be better than either agent alone. In trials, about 17% of people were cured using efinaconazole as opposed to 4% of people using placebo.