“My project is due in three days and it’s off the rails!” Or perhaps it seems so. Even if the project seems to explode at the last moment, all is not necessarily lost.

Typically, projects fail for more than one reason, and symptoms of trouble tend to display themselves immediately. Assuming you recognize the warning signals when they arise.

At the earliest sign of project instability, you should adjust your project plans, schedules, and budgets. When it is this late in the game and your project deadline is imminent, it can feel like Mission: Impossible to try to get it back on track.

But you can give it a shot. (What do you have to lose?) Here are four things you can do to keep your project moving forward even when all seems to be lost.

Be Honest and Transparent

No Project Manager should ever lie about the project status. Some PMs are afraid to share that their project is behind schedule or over budget because they see this as a personal risk. However, project failure does not have to mean personal failure.

Project status should be clear to the entire project team, especially to the project sponsor and the management team that approved project initiation. If you don’t share the project pitfalls and challenges with these stakeholders in a timely fashion, you risk further damage to your project.

The last thing you want do is walk up to your sponsor on delivery day, after having stated that everything was on track, only to confess that the work has not been completed. If your project is close to completion and has totally gone off the rails, your sponsor should trust you to honestly represent that status.

Step 1: Let everyone know the current status. Every decision you make after this stage impacts the entire project team as well as the business, so all parties should be keenly aware of its condition.

Diagnose Your Project

Your project may be so close to completion you can almost taste it. Up until this point, everything seemed to be on-track to finish on time and on budget. Whether the wrench in your plan came from a sudden and unexpected change (such as a contractor defaulting on commitments) or a conglomeration of a million tiny things that abruptly came to a head, you have to take stock and decide how best to move forward.

A few key points during the diagnosis process:

Don’t rush to fix it. Before spending any of your time and energy in crisis mode attempting to pick up the pieces and crash your project, make sure that fixing the project is the right decision. Not all projects deserve to continue past their initial deadline, so be sure you are considering your project in light of all factors before moving forward with a new plan.

Before spending any of your time and energy in crisis mode attempting to pick up the pieces and crash your project, make sure that fixing the project is the right decision. Not all projects deserve to continue past their initial deadline, so be sure you are considering your project in light of all factors before moving forward with a new plan. Analyze the project against the business case. Ideally, during your entire project you have measured it against the business case to understand why your project is needed. Does this need still need to met? Or has it changed? That should factor into whether and how to complete your project.

Ideally, during your entire project you have measured it against the business case to understand why your project is needed. Does this need still need to met? Or has it changed? That should factor into whether and how to complete your project. Ignore sunk costs. The time and money that has been spent on the project up to this point does not factor into whether you should complete the project. The U.S. Military has cancelled projects with over US$18 billion in sunk costs when the completed project would not be worth the additional time or costs needed to continue. Instead of focusing on sunk costs, take some time to complete a cost-benefit analysis to discern if your project is worth saving considering your constraints.

Step 2: Analyze the situation. You don’t have a lot of time, so it can’t be exhaustive, but you do need your decisions to be based in reality. Don’t focus on why the problems occurred at this stage; it is more important to decide if you should move forward.

Focus on the Right Priorities

It can be easy to get lost in deciphering how this happened to your project and how it got so far off-track. Stakeholders and team members may want to spend this time passing blame and pointing fingers, but you cannot let this tendency derail your project any further. That’s a trap and a distraction, right now. While tempting, you simply don’t have the time. Let the team know that you will do a full root-cause analysis during the post-mortem, and try to get the team to refocus its efforts on what needs to be done to move forward.

For your project to succeed, you must take ownership of the situation and try to keep your team and your client happy. Now is the time to discuss potential next steps with your stakeholders. Get buy-in from key players before settling on your new plans. Keep in mind that you may need to ask for more money, more time, more resources, or scope may need to be reduced in order to deliver.

Step 3: Gain consensus on next steps. By managing stakeholder expectations and getting everyone to nod along, you are much more likely to be successful.

Accept Change

Now it’s time to implement your project management magic: managing change. Change usually is hard for people, especially when it’s a complete overhaul of the status-quo.

Depending on the new course your project is taking, you may be asking a lot of your team: overtime, re-work, restructuring, changing team members, or completely scrapping work that has already been done. During this stage, it is important to motivate and empower your team members so that they stay fully engaged and committed to getting the project out the door.

Step 4: Facilitate collaboration and productivity. You may need to get creative in order to keep your team motivated and accepting of the new project trajectory. Show them that they are appreciated, pay close attention to their needs, and adapt your management approach as necessary.

Stay Positive

No one wants your project to fail! Management rarely wants to abandon a project; many will push for project delivery and don’t want to slow down or shut down. It is your responsibility as an effective project manager not to over promise what you can deliver and be willing to adapt when needed.

By maintaining strong relationships with stakeholders throughout the project, you can trust that when your project is threatening to nose dive you can count on your team to stay focused on what is best for the project and the business.