Your company has just developed an amazing new product. Years of development, energy, and, of course, money have gone into it. Hype and excitement behind the launch pushes it into high gear. But it falls apart at the seams at the last moment, leaving your company on the brink of disaster. What do you do next?

Having observed management teams for decades as a mutual fund and portfolio manager, I have watched numerous companies vanish after a disastrous launch of a product or service. Very few find a way to avert the fall; even fewer can identify the potential threat early and rally the troops in a new direction. A charismatic CEO with the willingness to accept a setback, move in a different direction, and persevere to achieve this new and difficult vision can succeed where most fail.

One CEO who had the ability to turn around a disaster was Frank Baldino of Cephalon. While this story is not new, it represents the perfect example of a phenomenal corporate turnaround and the skills required to engineer such a recovery.

Cephalon’s IPO was in 1991, part of the second wave of biotechnology companies to sell shares to the public. The focus of the firm was development of a treatment for ALS, or Lou Gehrig’s disease, and its leader was Dr. Frank Baldino, an intense, brilliant, and charming scientist. Cephalon’s lead molecule, Myotrophin, was a growth factor, intended to promote neurons that ALS destroys. Nearly all the assets of the company were targeted on this drug program. The stock climbed in anticipation of the clinical results, but unfortunately, the data were not strong enough for the FDA. Realizing that a rejection from the FDA was possible, Baldino sharply scaled back the Mytrophin program, containing the risk but maintaining an option on the possibility of success. The FDA voted to reject Myotrophin in 1997.

Even with Baldino’s proactive efforts, this was a large blow to the company. When disaster strikes, a forward-thinking CEO needs a back-up plan. Baldino already had one, albeit on a small scale, while Myotrophin was still on a fast track. In 1993, he purchased the rights to a well-tested drug for narcolepsy, Provigil, from a French company named Labon. Without shifting the spotlight from the company’s lead program, Baldino quietly moved resources to a second track. Following the FDA decision, Provigil took center stage. As Lisa Burns, CEO of Burns McClellan, long-time publicist for Cephalon, told me in a recent phone interview, “All the energy that Frank had applied to Myotrophin, he turned to Provigil.”

Baldino moved aggressively to bring Provigil to market. He convinced his board of directors and his management team that this was the right path, and he began to seriously promote Provigil within the company and to outside investors. While it might have appeared that Cephalon was a one-trick pony, the intentional overlap with another equally viable drug allowed the firm to maintain its momentum and created another road to success — one that the company needed. Persuasiveness about a new direction is critical for the CEO who is trying to save a sinking company. In this case it worked: The drug was approved at the end of December 1998.

Despite this, skeptics dismissed Provigil as a limited drug with no more than $100 million sales potential. Baldino had other ideas. Baldino sought to convince thought leaders of the therapeutic benefit, prove the drug worked, and then market it to the needy community. Provigil improved sleep apnea and wakefulness in shift workers with sleep-related problems. According to Burns, “Frank’s big, bold, bravado personality, combined with his abilities as a great scientist, helped build a previously undefined market for the drug that he brought to the U.S.” As a result, the sales force could market the drug to a larger market, including doctors treating airline pilots, truck drivers, military personnel, and factory workers who needed to stay awake at strange hours.

But Baldino didn’t stop there. As a shrewd manager, Baldino leveraged the company’s sales force by adding related products to its core franchise. He acquired two other drugs for the marketing team to sell to the neurologists whom they were already detailing. He developed the next generation form of Provigil prior to the patent expiration. By 2010, sales exceeded $2B.

From a failed product to a stock that rose to a value of over $5 billion in much of the 2006-2010 period, Frank Baldino had rebuilt a decimated company, creating meaningful wealth for his shareholders and many of his employees. Baldino passed away in 2010, but his actions offer an example for CEOs today. Managers who scrap all plans after one failure may be forfeiting tremendous rewards. A shift in direction and dedication to a new — if not challenging — vision can be a tough route to take. But with the right commitment and creative thinking, it could be the way to save your company from the brink.