The new indictments of Jeffrey Epstein and R. Kelly have in common that they were driven in large part by media activity, which set out on cold trails to develop explosive evidence that has now made its way into serious federal charges.

Late last year, Julie K. Brown of the Miami Herald nearly single-handedly breathed new life into the allegations against Epstein, bringing down Labor Secretary Alexander Acosta, who as U.S. Attorney for the Southern District of Florida, approved a sweetheart plea deal for Epstein in 2008. But for Brown’s dogged and meticulous reporting, Epstein almost certainly would have continued to evade justice.

Likewise, the Lifetime documentary series “Surviving R. Kelly” that aired in January contributed greatly to the new federal charges filed against Kelly in Chicago and Brooklyn. Here, it was producer Dream Hampton’s persistence and vision that brought new attention to the musician’s alleged pattern of sexual abuse of minors, which had somewhat faded into obscurity following his acquittal in 2008 on child pornography charges.

Brown’s and Hampton’s achievements are all the more laudable given the widespread reports in both the Epstein and Kelly cases that many people had been aware of their alleged criminal conduct for years, but had kept quiet or even facilitated it. Little wonder that so many of Epstein’s and Kelly’s alleged victims had been cowed into silence and lacked confidence that the justice system would treat them fairly. Brown and Hampton needed to persuade them to set their fears aside and speak out.

So all praise to Brown and Hampton. Both stepped in to revive cases and, in particular, to give voice to victims that the system had poorly served.

But the relationship between blockbuster stories and criminal prosecutions is not always so straightforward. As a former prosecutor, current journalist and occasional writer for television, I recognize the potential for distortions on both sides of the equation.

For one thing, reporters and producers of splashy media coverage may not know the whole story available to law enforcement, particularly when it concerns a prosecutorial decision not to bring charges. On my first day as a U.S. attorney, I had to announce to the community that we would not bring charges for the widely publicized death of an African American motorist who was killed during a traffic stop. The case was tragic and the white police officer’s conduct was deplorable, but key pieces of evidence were missing. Trying to explain that we did not think we could win this case against the drumbeat of media coverage required me to borrow from capital I didn’t have.

This need to ask the public to have faith that the government has acted appropriately — based on information it can’t fully reveal — imposes a particular strain on trust. Thus, when the Justice Department announced this week that Attorney General William P. Barr had squelched any prosecution of New York police officer Daniel Pantaleo in the choking death of Eric Garner, its decision was bound to be accepted with skepticism among those who have come to view the Justice Department under Barr as politically driven. From my time at Justice, I think the more likely explanation is that the evidence was inadequate, but it’s difficult to defend that view in light of the newspaper coverage and widely viewed video that emphasized the apparent injustice of Garner’s death.

It’s also fair to note that while the media is pursuing the truth in its own fashion, the dictates of a good story are different from those of a righteous prosecution. There are predictable reasons media coverage would have a spin on events that overlooks or minimizes the key legal elements that necessarily drive prosecutorial decisions.

And prosecutors are severely constrained in what public comments they can make to correct the record, which, among other things, can violate the rights of uncharged persons. My local paper ran a series about supposed nationwide abuses by federal prosecutors that, based on what I knew, was riddled with factual errors. But it pushed a colorful story line, and the public explanations we could provide to reassure the public were muted and bland in contrast.

Then there is the converse problem of some prosecutors pursuing cases because of the moth-to-flame appeal of keen media interest. It’s disreputable, but it happens. And it is another way in which splashy coverage can push against the impartial pursuit of justice.

So I make it a point to try to reserve judgment when I see a case land in a prosecutor’s office in the wake of prominent media coverage. I keep in mind that prosecutors and the media have different information bases as well as somewhat different goals, even if a search for truth drives them both. And that more often than many people think, the truth is the drab dog-bites-man story line that justice was served.

Read more: