Like most disciplines of law, there are volumes of text that contain the details.  One of the complexities of the bankruptcy laws is that it reaches beyond back in time and into the future.  It behooves the petitioner to consult with an attorney before making any decisions that are of a financial nature.  For example, the following warnings can be found within the bankruptcy law (USC 11), but they won't be in terms that are simple to understand.

With regards to specific action that you can take prior to filing bankruptcy, some are highly advisable and some can cause hardship.  The following are issues to be aware of so you can act accordingly.

Borrowing Against a 401K, IRA or Other Retirement Account to Pay Off or Consolidate Debt

Retirement accounts are generally protected in bankruptcy. That means you can file for bankruptcy, eliminate or consolidate debt, and still keep all of your retirement funds intact. If you are trying to forestall bankruptcy, perhaps waiting for a tax return, but getting pressure from one insistent creditor, you may be tempted to borrow from your 401K. It's rarely a good idea!

Instead, talk with your attorney about other options that might give you the breathing room you are looking for. If you take out a 401K loan expecting to repay it and can't, in addition to reducing your retirement funds unnecessarily, you may have early withdrawal and tax consequences that are not dischargeable in bankruptcy.

Making Preference Payments

It's not uncommon to want to clear up debts you have with family and business associates before filing, but this one mistake can have serious consequences. Under bankruptcy law, all creditors of the same class have a right to a proportionate share of recovery so you can't treat one creditor better than another. If you do, it can be considered a "preference" and the court can order return of the money to the bankruptcy estate. The trustee looks for preference payments made 90 days prior to filing, and for family members, the window is one year. Be sure to discuss any payments to family members with your attorney and plan the timing of your filing accordingly.

If you have already done either of these and have not yet filed for bankruptcy, you may choose to wait or you can weigh the consequences and seek strategies are acceptable to you and that will allow you to file anyway.