If you have any inkling that your job might be in trouble, you should try to find out what your company will offer you if it lets you go. See whether your company offers a severance package. That could provide from a couple of weeks to six months of full pay. You can usually take severance as a series of payments, which can have tax advantages. But take it as a lump sum if you think your company might fail anytime soon.
Also ask whether you can continue your company's health insurance by paying for the premiums yourself under a program called COBRA. Then check how that compares to buying insurance on your own or joining your spouse's program.
If the worst does happen and you're fired, apply immediately for unemployment insurance benefits because it could take two to three weeks for you to get your first check.
You can get more advice on what to do if you lose your job a here
A free counseling organization called SCORE helps connect people who want to start a small business with retired business professionals and other volunteers. You can get more information at www.score.org/index.html.