We all know the saying that it's better to be lucky than smart. I needed a lot more than luck to build the records-storage business that I sold in 2007 for $110 million, but I've recently realized I was luckier than I knew in deciding to sell when I did. Therein lies a lesson in the importance of building a business so that it can be sold whenever the timing seems right.

Understand, I built CitiStorage with an eye toward eventually selling it. I think all entrepreneurs should do that, regardless of their exit strategies. When you build to sell, you learn to look at your business the way a potential buyer would. You become more aware of the company's weaknesses, and you have an opportunity to eliminate them and strengthen the business, thereby creating additional value. Building to sell also leads you to adopt best practices. You'll have a better business as a result--even if your intention is to hold on to it indefinitely, rather than sell it.

My assumption was that I'd someday sell to another company or a private equity group. Because I'd made sure that CitiStorage would be sellable at any given moment, I had a lot of control over the timing of a deal. The question was, When should I pull the trigger?

I traveled a convoluted route to answer that question. Suffice it to say that I ultimately based my decision on the belief that the market for selling businesses--and especially companies like mine--had peaked. You could see it in the historically high multiples of earnings that buyers were paying. I didn't know how long the peak would last, but I was confident that prices wouldn't rise much higher. I also figured that, once prices began to fall, it might be another 10 or 20 years before the cycle would run its course and we'd hit another peak. I was 65 years old. I decided I should cash out when I could.

Looking back, I can now see that there was another reason for cashing out at that particular moment. The company had a vulnerability that turned out to be a lot more serious than I'd realized. It had to do in part with our customer concentration. About 65 percent of our business was with hospitals and other medical companies.

We had focused on the medical field because all of our competitors were focusing on law offices and accounting firms. We thus had the medical market virtually to ourselves. We became experts in handling medical records. We knew the Health Insurance Portability and Accountability Act privacy rules better than our prospects and could teach them how to comply. And so we signed up one customer after another.

What I didn't anticipate was the speed of change from physical to electronic records. It has happened in every market segment, but nowhere faster than in the medical field. Our warehouse used to have tens of thousands of boxes filled with X-rays on celluloid film. Well, celluloid X-rays scarcely exist anymore. These days, medical images are digital and stored accordingly.

I'd always figured that digital technology would disrupt the box business, but I never imagined the change would come so soon and so rapidly. I see now that, if I had not sold CitiStorage in 2007, technology would have destroyed a lot of the equity I'd spent 17 years building. Today, instead of starting new businesses, I would be scrambling to reinvent the old one. I got lucky, for one and only one reason: I built my company to sell.