In the four years since superstorm Sandy destroyed swathes of the Rockaways, devastated neighborhoods in Staten Island, and flooded homes from Broad Channel to Canarsie, NYC has tried to use its Build It Back program to help thousands of homeowners.

But the program has been beset by delays, bureaucratic challenges and cost overruns. Now, city officials have to determine what went wrong, expedite remaining home renovations and develop a better plan to handle future post-storm reconstruction.

Build It Back had a rough start under former Mayor Michael Bloomberg. Mayor Bill de Blasio made progress and pushed the program forward, pledging a year ago to have all single-family homes finished by the end of 2016.

That’s not going to happen. Of 5,565 homes in the program, about 68 percent have begun construction. It has been a frustrating, complicated effort to find people to do the work, address homeowner needs, meet federal standards and deal with other issues, from how to elevate homes on narrow streets to how to repair attached townhouses owned by different residents.

Meanwhile, the program’s cost has ballooned to more than $3 billion, requiring the city to move funds from federal flood protection coffers. City officials say they’ll replenish the federal funds from the capital budget. That has to happen.

We’re glad city officials are being honest in recognizing that Build It Back didn’t work. But as the program enters its fifth year, city officials should further analyze and audit the program. That may require an independent investigation from the comptroller, public advocate or Department of Investigation.

Finish the job and learn for the future. That should include examining other cities’ best practices, developing alternative strategies like acquiring vulnerable properties rather than rebuilding every destroyed home, and planning as much as possible so assistance programs are ready to go when needed. Get ahead of the next storm starting now.