It ranks among employers’ worst nightmares: You’ve received a harassment complaint from an employee or a temporary worker.

Or perhaps your client company reaches out with a complaint against one of your assigned workers. The cardinal rule is this: you must conduct an investigation.

As an attorney who deals with workplace lawsuits, and who deposes investigators engaged by the employer to conduct these investigations, I offer tips on how employers and their investigators can handle complaints in ways that will fix the problem instead of inviting a lawsuit.

No matter the source of the complaint, it needs to be investigated, and if a client company is involved, both parties should coordinate and cooperate with one another, each participating fully in the investigation and ensuring its completeness.

We are not enemies. The truth is we want the same thing — no harassment of employees and no need for employment lawsuits. That means you should make sure your investigator conducts a thorough and fair investigation that provides you with the information you need to hold wrong-doers accountable. If it comes to it, they will also need to be able to explain in depositions exactly how they went about their work.

Unfortunately, sometimes it is the employer’s actions that lead to complaints. Whether an investigation leads to a determination of culpability on your company’s part or a finding in your favor, you need to ensure the investigator has done their due diligence because a poor investigation will be picked apart by good plaintiff’s counsel. If after a thorough review, the investigator determines the company failed to prevent the harassment in the first place, refused to remedy wrong-doing or permitted retaliation, lawsuits may follow.

But if a flawed investigation leads to exoneration of the company, that’s when lawsuits are most likely. Therefore, the rest of this article is geared to highlighting the better practices in investigations.

Follow the leads. Listen to the complainant and investigate the leads provided, down to the last witness and text message.

Listening closely to what the employee and other witnesses have to say is the first and most important skill of an investigator. The next most important skill is to investigate the leads provided to you by the complainant, including interviewing witnesses, obtaining documentary evidence and following up on any new information gleaned from those efforts.

Workplace investigations generally start with information provided by an employee in the form of a complaint or a concern. It is critical to give complainants a full opportunity to identify witnesses and documentation that lead them to believe that something discriminatory, harassing, illegal or unfair has happened in the workplace. An investigator should navigate through the same evidence that those of us who represent employees will explore to find support for the claims of a lawsuit.

Far too often, workplace investigators stop following the trail of evidence described by the plaintiff to support their claims and choose instead to focus on the witnesses and documents offered by the employer to refute them. If your investigator makes this mistake, expect to be confronted at your deposition or at trial with the information you missed that undermines your findings, putting your company at risk of a judgment against it.

Make credibility determinations. Even decades into the development of workplace investigation as a profession, we still come across investigators who claim they were not able to make a factual determination because it was a “he said-she said” situation.

Central to any workplace investigation is the need to make credibility determinations. Failing or refusing to do so will run you afoul of the investigation standards of EEOC guidance. You can be sure that any good plaintiff’s attorney will focus upon a failure to reach credibility determinations.

Don’t let them phone it in. Insist that your investigator interviews witnesses in person, and that all of your employees comply. And if a client company is involved, coordinate with them to ensure their compliance as well. Complainants are almost always questioned in person and frequently for lengthy times. The same investigator then sometimes turns around and conducts only telephone interviews of witnesses who support the employer’s version of events.

If in-person evaluation of the complainant matters, the same holds true for those who are accused of engaging in or ignoring wrongdoing. Similarly, taking an aggressive approach with the complainant, while soft-pedaling when it comes to the accused’s or employer’s witnesses, is as unfair as it looks. It also provides plenty of material for a plaintiff’s attorney to work with in undermining the neutrality of your investigation.

Probe for witness bias. Workplaces are all about relationships. Juries will want to know the backstory about how all of the players relate to each other and who has a reason to shade the truth in order to protect or harm someone else. When witnesses come up with conflicting versions of events, be sure to probe whether something about their relationship to each other, or to the complainant, or to the employer, has created a bias. You don’t want the first time you learn that the manager and the alleged harasser are drinking buddies to be when you are on the stand at trial.

Recognize implicit bias when you see it. More and more, the litigation of employment cases includes testimony and arguments regarding the implicit biases that serve to keep women, people of color and members of other legally protected classes from having access to equal opportunity. It is critically important for investigators to understand how discrimination manifests itself through exclusion, in-group behavior, and assumptions and decisions based on stereotypes. Educate yourself about implicit bias, beginning with taking the Implicit Association Test from Harvard. Another good starting point is the white paper that came out of the Obama White House Office of Science and Technology in 2015.

Plaintiffs’ lawyers are bringing implicit bias analysis to bear in cases with greater frequency, focusing discovery on the beneficial opportunities and attitudes extended to employees with societal privilege as compared to employees who are considered “other.” Particularly when it comes to employees who complain of discrimination, investigators should be wary of discounting complaints without considering the workplace context.

Do documentation right. Consider carefully whether the record you create of your witness interviews serves the purpose of your investigation and demonstrates a fair and neutral approach to your task. Recording interviews is the best way to be sure you do not miss or misinterpret what witnesses have to say. The next best option is detailed, contemporaneous notes. Investigators who choose to create summaries after the fact and destroy their contemporaneous notes leave open the claim that they are cherry-picking statements or creating a revisionist account.

Plaintiffs’ lawyers will also challenge you or question your neutrality if you take a detailed approach to documenting the employee’s statements while creating only spotty records of what the accused or management witnesses had to say. None of this should come as a surprise.