(AP) — A federal judge said Tuesday he will closely monitor Pacific Gas & Electric’s tree-trimming this year and barred the utility from paying out dividends to shareholders as part of a new, court-ordered wildfire prevention plan.

U.S. District Judge William Alsup ordered the new plan during a hearing in San Francisco to consider terms of the utility’s felony probation for a deadly natural gas explosion. The judge stopped short of adopting more stringent conditions initially proposed, including ordering PG&E to inspect every inch of its power grid.

Alsup modified the terms as part of an effort to cut down on wildfires started by the company’s equipment, mostly by trees falling onto power lines. Alsup called the utility’s efforts to prevent trees from hitting power lines dismal while it was paying dividends to shareholders.

PG&E suspended dividend payments in late 2017 and said it will not do so at least until it emerges from bankruptcy. Nonetheless, Alsup barred it from restarting dividend payments without court order.

The company sought bankruptcy protection in January in the face of billions of dollars in potential liability from recent wildfires.

“A lot of money went out in dividends that should have went into tree trimming,” Alsup told PG&E acting chief executive John Simon during the hearing. “PG&E pumped out $4.5 billion in dividends and let the tree budget wither. So a lot of trees should’ve been taken down that were not.”

Alsup is still considering ordering further prevention steps, including requiring PG&E to shut power more often during high winds.

“We share the court’s commitment to safety and understand that we must play a leading role in reducing the risk of wildfire throughout Northern and Central California,” the company said in a prepared statement after the hearing.

Company spokesman James Noonan said PG&E is awaiting regulatory approval of its tree-trimming plan and other wildfire prevention efforts.

The company also plans to start inspecting its equipment in remote Northern California forests by helicopter, he said.