The National Flood Insurance Program is facing questions about its future amid rising costs related to Hurricane Harvey.

The federal program already owed almost $25 billion to the U.S. Treasury before Harvey's heavy rains and winds devastated Houston, an event certain to further strain the NFIP. As costs mount, it's likely to heighten the debate about the future of the program, which is up for congressional renewal at the end of September.

Although many Americans may not be familiar with the flood program, it has proved an important financial aid to residents and businesses in flood-prone areas like Houston and Miami. Because standard homeowner's insurance doesn't cover flooding, property owners must turn to the government for coverage. Banks also generally won't provide mortgages to properties in flood zones, which means the program is essential for economic development in many coastal or low-lying areas.

Get Breaking News Delivered to Your Inbox

Despite that critical role, however, the NFIP is chronically distressed.

"The program is a mess," said Chuck Watson, director of research and development at Enki Research, which specializes in geophysical hazard research. "We should have been talking about it six months ago, but no one wants to talk about it until it's too late. We've gone through this cycle again and again."

He added, "We have to fix the flood insurance program" because builders and homeowners will continue to construct properties in coastal areas, where storms are becoming more damaging due to climate change.

The NFIP is mired in debt due to a simple equation: The program doesn't charge rates high enough to offset the increasingly large losses from the big storms that have battered the country in recent decades.

"This lack of sufficient revenue highlights what have been structural weaknesses in how the program is funded," the U.S. Government Accountability Office noted in a report published earlier this year. Its rates "do not fully reflect the risk of flooding."

The program's headaches began after 2004, when financial claims began to outpace the revenue it was taking in following Hurricane Katrina and subsequent damaging storms. Katrina in 2005 stands as the most economically destructive storm in U.S. history, at $118 billion, according to Enki. Four of the 5 most damaging storms in U.S. history have occurred since 2005.

Congress has been considering some changes to the program, such as allowing privatization, a tweak that many experts say would help overhaul flood insurance. Yet there are downsides to privatization, such as the potential for private insurers to pick only the safest properties as clients. If the NFIP were to be left with only the riskiest properties, it could face even steeper revenue shortfalls.

So why does the NFIP charge less than it needs to break even? It's partly because the flood maps it relies on are outdated, especially given the increasing frequency of big, damaging storms like Harvey. Almost 7 million coastal homes are at risk for damage to storms and hurricanes, representing a reconstruction cost of more than $1.5 trillion, according to a June report from CoreLogic.

Texas is ranked as the third-riskiest state by the real estate analytics firm, which said it has 536,000 at-risk homes. (Florida and Louisiana ranked first and second for the most at-risk properties, respectively.)

As losses from Harvey pile up, the destruction is likely to be a double-edged sword for the NFIP. While thousands of claims stemming from the storm are expected to push it deeper into debt, the program may now be viewed as a priority by lawmakers.

"The National Flood Insurance Program is already $25 billion in the hole, and this could add $10 to $15 billion to that, maybe even more," Enki's Watson said.

Those problems could push Congress to extend the program in September, he noted. It could also push lawmakers to buckle down on reforms to the NFIP.

For the time being, it will take weeks and months for property owners to file claims from Harvey, which means the ultimate cost to the NFIP may not be clear for some time.