The start of the school year usually marks a hopeful beginning for many communities, but reports of contaminated water in Detroit schools are just the opposite. After testing for elevated levels of lead and copper in drinking water, sixteen schools exceeded safety guidelines, which resulted in shutoffs across the entire district. And just this week, more reports have surfaced on several other districts across the country with similar water quality challenges. Over the coming months, students, teachers, and their families must contend with bottled water, dry water fountains, and lingering health concerns.

These school districts are just another example of where inadequate testing and decades of underinvestment have resulted in water infrastructure that is aging or susceptible to widespread failure (or both). By now, stories of cities like Flint and New Orleans are etched in our national consciousness, as pipes and other facilities struggle to provide safe, affordable, and reliable service, let alone be prepared to stand up to a mounting number of climate pressures.

Why do we keep experiencing these tragic water failures at the local level?

First, the lack of frequent, rigorous testing and precise metrics make it hard to detect any potential infrastructure shortfalls. Unclear guidelines from the U.S. Environmental Protection Agency are partly to blame, but the voluntary nature and uneven understanding of these testing efforts across different localities is problematic as well; for instance, if school leaders in Detroit did not run their recent water tests, the issue would be out of sight and out of mind. Beyond drinking water, localities also typically do not have timely, detailed information on their various wastewater and stormwater concerns—to say nothing of their shrinking pool of skilled workers to carry out these tasks.

Second, perhaps more importantly, a combination of local economic struggles and fiscal constraints make it difficult to maintain existing infrastructure and ultimately accelerate needed capital improvements. For example, replacing pipes and pursuing more resilient green infrastructure upgrades may be costly upfront, but lead to greater savings and performance in the long run. However, as local utilities and other agencies balance tight budgets, face enormous debt burdens, and confront a rising number of repairs, they may opt for temporary fixes or—worse—simply defer action.

As local utilities and other agencies balance tight budgets, face enormous debt burdens, and confront a rising number of repairs, they may opt for temporary fixes or—worse—simply defer action.

To be sure, the water shutoffs in Detroit’s schools do not embody all these concerns. And give some credit to Detroit’s leadership; local and regional water agencies were quick to reassure residents of current system conditions, while school leaders are now taking extra precautions and creating a task force to advance collaborative solutions. But finding out which school pipes or fixtures are behind the issue is only the beginning of a lengthy and expensive process for a city already buried in debt.

Solving this issue in Detroit and beyond will require a more fiscally-resilient, proactive process.

Prevention is the best medicine, a prescription that applies to all infrastructure sectors. Adapting to and accounting for future infrastructure risks requires diligent oversight and ongoing investment, rather than continually relying on legacy systems that are ill-equipped to handle new shocks (or even daily use). And while federal and state leaders certainly have a role to play in overseeing and supporting these efforts, localities are in the driver’s seat, accounting for more than 95 percent of public spending on water infrastructure each year.

But localities shouldn’t see this as a burden. It’s an environmental and economic opportunity.

After all, planning and paying for such infrastructure upgrades isn’t just a necessity for long-term health and safety, but it makes good economic sense too. From New Jersey to Minnesota, many localities are not just throwing more money at their water infrastructure, but quantifying their needs more precisely, integrating new designs and technologies, and seeking more flexible financial tools that ultimately support efficient, cost-effective service. Moving forward, the key will be exploring how places are able to embrace these new approaches and the potential for replicating solutions across different regions.

Children and parents hope to wake up in August and September thinking about what to pack for lunch and what clothes to wear, not whether school water is safe to drink. Children’s safety should be the wake-up call communities need.