Hostess Brands Inc. and its second largest union will go into mediation to try and resolve their differences, meaning the company won't go out of business just yet. The news came Monday after Hostess moved to liquidate and sell off its assets in bankruptcy court citing a crippling strike last week.

The bankruptcy judge hearing the case said Monday that the parties haven't gone through the critical step of mediation and asked the lawyer for the Bakery, Confectionery, Tobacco Workers and Grain Millers International Union, which has been on strike since Nov. 9, to ask his client, who wasn't present, if the union would agree to participate. The judge noted that the bakery union, which represents about 30 percent of Hostess workers, went on strike after rejecting the company's latest contract offer, even though it never filed an objection to it.

"Many people, myself included, have serious questions as to the logic behind this strike," said Judge Robert Drain, who heard the case in the U.S. Bankruptcy Court in the Southern District of New York in White Plains, N.Y. "Not to have gone through that step leaves a huge question mark in this case."

Closing down Hostess plants nationwide would mean the loss of about 18,500 jobs, 145 of which belong to workers at Oakland's Colombo Bakery, located in East Oakland near Interstate 880.

On Monday, the bakery workers resumed picketing the Oakland plant. "They've been taking money out if the hands of employees and it's going to management," said baker Tony Badilla. "We don't agree with that."

Hostess and the union agreed to mediation talks, which are expected to begin the process on Tuesday.

In an interview after the hearing on Monday, CEO Gregory Rayburn said that the two parties will have to agree to contract terms within 24 hours of the Tuesday since it is costing $1 million a day in overhead costs to wind down operations. But even if a contract agreement is reached, it is not clear if all 33 Hostess plants will go back to being operational.

"We didn't think we had a runway, but the judge just created a 24-hour runway," for the two parties to come to an agreement, Rayburn said.

Hostess, weighed down by debt, management turmoil, rising labor costs and the changing tastes of America, decided on Friday that it no longer could make it through a conventional Chapter 11 bankruptcy restructuring. Instead, the company, which is based in Irving, Texas, asked the court for permission to sell assets and go out of business.

It's not the sequence of events that the maker of Twinkies, Ding Dongs and Ho Ho's envisioned when it filed for bankruptcy in January, its second Chapter 11 filing in less than a decade. The company, who said that it was saddled with costs related to its unionized workforce, had hoped to emerge with stronger financials. It brought on Rayburn as a restructuring expert and was working to renegotiate its contract with labor unions.

But Rayburn wasn't able to reach a deal with the bakery union. The company, which had been contributing $100 million a year in pension costs for workers, offered workers a new contract that would've slashed that to $25 million a year, in addition to wage cuts and a 17 percent reduction in health benefits. But the bakery union decided to strike.

By that time, the company had reached a contract agreement with its largest union, the International Brotherhood of Teamsters, which urged the bakery union to hold a secret ballot on whether to continue striking. Although many bakery workers decided to cross picket lines this week, Hostess said it wasn't enough to keep operations at normal levels.

Rayburn said that Hostess was already operating on razor thin margins and that the strike was the final blow. The company's announcement on Friday that it would move to liquidate prompted people across the country to rush to stores and stock up on their favorite Hostess treats. Many businesses reported selling out of Twinkies within hours and the spongy yellow cakes turned up for sale online for hundreds of dollars.

Even if Hostess goes out of business, its popular brands will likely find a second life after being snapped up by buyers. The company says several potential buyers have expressed interest in the brands. Although Hostess' sales have been declining in recent years, the company still does about $2.5 billion in business each year. Twinkies along brought in $68 million so far this year.