Experiencing the failing of your business is one of the hardest things an entrepreneur can think of. Especially if you’ve devoted years of your life and thousands or even millions of dollars into your company, finding out that you can’t afford to stay in business anymore can be detrimental to your lifestyle and mental health. However, many of the problems businesses face that result in bankruptcy and failure could have been avoided if they’d only known what to look out for. To make it so your business stays afloat, here are three tips for avoiding bankruptcy as a business and remaining in the black.

Don’t Be Everything To Everyone

Karen E. Klein, a Bloomberg reporter, found out from Paul Carroll, co-author of Billion-Dollar Lessons, that most business failures can actually be traced back to one single strategy decision that caused the company to begin hemorrhaging money. For this reason, companies that truly understand their business model and their brand have a greater chance of retaining their market share and making a profit. It’s once businesses try to be everything to everyone and offer products or services that don’t align with their true company mission that they run into financial trouble. So if you plan on branching out into new markets, be sure you have a solid plan of attack and know when it’s time to cut your losses.

Save For the Hard Times

With an ever-fluctuating economy, many businesses experience a “feast or famine” type of situation on a yearly or even monthly basis. Because this is so common, Chuck Benjamin, a contributor to CFO.com, recommends for businesses to always shoot to at least achieve cash-flow equilibrium. By understanding how much money you need to make in order to keep your doors open, you can save money when you’re hitting well above those numbers and still be safe when your sales are lower. Without at least this amount of forethought, you may find yourself in a financial situation that puts your entire operation at risk.

Understand Your Alternatives

While many business who’ve lost money or have large amounts of debt may feel that declaring bankruptcy is their only option, there actually are a few alternatives that will allow you to retain your business and try to work through your financial issues. According to Bankruptcy for Business by Lei Lei Wang Ekvall and Evan D. Smiley, two of these options are “out-of-court workouts” and “assignment for benefit of creditors.” While neither of these options are ideal, they may prove to be just what your business needs to remain open and dig its way out of a steep financial hole.

No company wants to surrender their business to bankruptcy as a result of financial turmoil. To make sure this doesn’t happen to you, use the tips mentioned above to help keep your business out of court and out of the red.