Debt Renegotiation and the Design of Financial Contracts