A transaction cost perspective on financial distress and capital structure