Forget the image of chimney sweeps dancing with Mary Poppins across the rooftops of London. Modern chimney safety is a serious business.

Chimneys, chimney connectors or fireplaces cause an estimated 22,700 residential structural fires every year, resulting in 20 deaths, 90 injuries and $111.7 million in property losses, according to the Consumer Product Safety Commission.

The main culprit is creosote, a flammable wood residue that builds up in the flue over time. If it ignites, the blaze might escape to the rest of the house through holes in the chimney. In March 2015, flames leaked through a six-inch hole in the side of a wood-stove chimney, setting fire to a 245-year-old Colonial house in Newport, New Hampshire.

To keep your home safe, learn how to take the right precautions — and when to call in the experts.

Related: 8 Flammable Liquids Lying Around Your House

Cap it. Water damages chimneys more often than fire does, creating gaps and cracks in the mortar that allow creosote to accumulate and fires to spread, according to the Chimney Safety Institute of America (CSIA). Place a cap over the top of your chimney to keep the rain out. Hire a contractor to install it correctly, advises John Drengenberg, consumer safety director at UL. “It should be far enough from the opening not to bother the flow of air that comes up,” he says. If your fire doesn't burn brightly enough, it could be that the cap is too close to the opening, he adds.

Waterproof it. Seal the interior with a waterproofing agent. “It is best if a professional does this for you since they can also look at the bricks and mortar to see if poor maintenance has caused any problems,” says Drengenberg.

Clear away debris. Chimneys radiate heat and can shoot sparks into the outside air. Remove tree branches and leaves to a distance of 15 feet from the chimney so they don’t catch fire.

Check for debris near exposed parts of the chimney inside your home, too. In the Chicago suburb of Geneva, a house caught fire after a bird's nest in the attic made contact with an exposed flue pipe .

Keep the fire in the fireplace. No matter how pretty the flames look, don't build them up until they reach into the chimney. “Use dry, well-aged wood, not greenwood,” says Drengenberg. “The slower wood burns, the more creosote you're going to get.”

Related: Is Your Fireplace Safe?

Let a professional inspect and clean it. Hire a chimney sweep to inspect it each year and after a chimney fire or severe storm, even if you don't see any damage, according to the Midwest Chimney Safety Council. Also have them sweep the chimney clean of creosote and debris at least twice during the wood-burning season. (The CSIA has a list of certified chimney sweeps in your area.)

“Don’t just go and clean out the creosote yourself,” says Drengenberg. “You could knock some of the mortar loose or cause other damage.” Plus, never clean a chimney by intentionally setting a chimney fire.

“These sweeps have been trained to the highest levels with peer-driven best practices, and they take an ethics pledge,” says CSIA communications and marketing director Tom Spalding. Expect to pay $100 to $300 for a visit, he adds.

If you need new equipment, such as a flue or damper, “tell the contractor that you want one that's certified by UL,” says Drengenberg. “We have a standard on factory-built chimneys.”

In between inspections, “look for the telltale signs that something's out of the ordinary,” says Drengenberg. “Is the fire not burning as brightly as it should? Is moisture falling into the fireplace? Look for rusting in the flue pipes that lead from your appliances, such as the furnace or water heater, to the chimney.”

Some final advice. You're not Santa Claus, so don't try sliding down a chimney. Just recently in Phoenix, a man got stuck trying to do just that, after accidentally locking himself out of his house. Two hours later, the fire department managed to pry him out.

Related: Hot Safety Tips for Backyard Fire Pits

David Arv Bragi is a freelance journalist and marketing consultant. He has been writing about health and safety issues since the 1990s and currently lives in Portland, Oregon.