As non-bank lenders search for opportunities in today’s hyper-competitive financing market, it’s easy to lose sight of the fact that great-looking deals do not always work out as planned. No amount of risk analysis and due diligence can eliminate the possibility of a borrower’s financial hardship, which in turn raises the specter of default. That’s why—when negotiating a deal—it’s important to also view transactions through the lens of how they may look in a restructuring.

Since the 2008 recession and its aftermath, when banks sharply curtailed lending to lower and middle market businesses, borrowers have increasingly turned to the private debt market for working capital and expansion capital. Yield-starved investors have rushed into the void. Private loans can return 7 percent to 9 percent—often more—compared to an average 4.3 percent for investment-grade corporate bonds. That has made private debt one of the fastest growing and most coveted asset classes. According to the research firm Prequin, 395 private debt funds will seek about $168 billion of new capital globally this year, and total outstanding private loans may exceed $1 trillion next year.

General partners (“GPs”) of debt funds face increasing pressure to maximize growth and achieve superior returns by identifying and closing deals quickly. Unfortunately, in the heat of competition, there can be a tendency to focus more on upside potential than downstream risk. At many times GPs may not give enough thought to how they can protect themselves should a borrower get into trouble: built-in early warning signals, triggers and attendant rights and remedies will enable the lender to spot trouble early and take proactive steps to maximize value, reducing the risk that the loan slides too far into distress thereby significantly reducing returns.

Such protections need to be built into the deal from the get-go. GPs and their lawyers should approach every prospective loan wearing both front end and restructuring hats. Even when going into a situation that may look like an excellent deal from a credit perspective, it is wise to go through an exercise of exit mapping before sending money out the door. This should be as much a part of contract negations as principal and interest amounts, collateral packages and loan duration.

Common loan covenants require a borrower to responsibly manage the business—pay taxes, abide by government regulations, take out certain insurance policies and maintain credible and verifiable books of accounts. They also give the lender the right to periodically inspect whatever collateral is offered for the loan. Other covenants may restrict major financial moves such as selling off assets, making investments or incurring additional debt, without the lender’s permission. Violating these covenants can result in financial penalties or allow the lender to take certain actions, ranging from declaring the loan into default and demanding full repayment, voting the equity of the borrower to put new directors on the board or foreclosing on the collateral.

An exercise of remedies is usually only the last resort, of course. Instead, early on active dialogue with a borrower facing distress is preferred. A well-crafted loan contract reduces the possibility that a situation will deteriorate beyond repair. It also allows lenders to reach a higher level of safety and comfort, while borrowers may qualify for a lower interest rate. Call it a win-win.

In practice, however, negotiating a private loan that satisfies both parties is a complex exercise of managing risk and return. Borrowers are often reluctant to agree to conditions that limit their ability to manage their companies as they see fit and respond to changing economic conditions to take advantage of emerging opportunities. GPs may be reluctant to push too hard, lest they jeopardize the deal. In doing so, they may be unwittingly setting themselves up for trouble down the road.