This would not be the first time Comey had the foresight to document an exchange that later sparked a major White House controversy.

In 2005, when Comey was deputy attorney general he emailed his chief of staff and others about objections to the George W. Bush administration’s use of harsh interrogation techniques, according to Politico. In the messages, Comey reportedly acknowledged that he approved most of the Office of Legal Counsel opinions authorizing the techniques, but he said he’d urged then-Attorney General Alberto Gonzales to advise the White House to abandon the harshest methods.

“In stark terms I explained to him what this would look like some day and what it would mean for the president and the government,” Comey wrote in a 2005 email message to his chief of staff, according to the Politico report. Comey added that future reviews would probably conclude “that some of this stuff was simply awful.”

When a controversy over the use of harsh interrogation flared up in June 2009, Comey’s mails made clear that he had not supported the policy.

“Comey had the foresight to write that email and then, when he left the DOJ, to print it out and put in into the file and hold onto it until four years later, when The New York Times went to write about his,” said Miller.

— Reuters contributed to this report.

Correction: Michael Flynn was fired as national security advisor. An earlier version misstated his title.

Watch: House Oversight Committee asks Comey to testify Wednesday