to counterespionage and his scaremongering public statements meant to rouse the US to the threat of German espionage angered the German and Irish communities, and eroded Flynn's support in Washington, ending in his resignation. After resigning, Flynn "accepted a sinecure as head of the Federal Railway Administration Police". Reinstatement and replacement Two years after leaving the Secret Service, in the wake of concerted terrorist action, including a bomb that "shook the home of A. Mitchell Palmer, the attorney general of the United States, virtually demolishing it", Palmer "dedicated his Department of Justice to tracking down the men responsible". He appointed Flynn director of the Bureau of Investigation. Flynn took charge of hunting down the bombers and assigned "an ambitious Justice Department clerk by the name of J. Edgar Hoover" to monitor suspected radicals. Through painstaking work, Flynn's team identified the likely suspects. However, they were unable to obtain the type of evidence that would stand up in court. Public opinion turned against the bureau, as the public wanted arrests, and Hoover launched a series of "Palmer Raids" that became a public relations nightmare. These events resulted in low morale among Flynn's staff, and the new Harding Administration replaced Flynn with William J. Burns. Semi-retirement After his forced retirement, Flynn went into business for himself. He founded a New York detective agency with his daughter Veronica and son Elmer as partners, which generated some income. However, according to Dash, the partnership was unsuccessful and contributed to the business's ultimate demise: Veronica and Elmer "were running the detective business into the ground. Both heavy drinkers, they overspent and upset clients. The pair's increasingly erratic behavior distressed their more abstemious father, and the worry weakened him." Flynn earned the bulk of his income, at that point, from writing. He had occasionally contributed articles, typically about his greatest cases, to such journals as The New York Herald and The Washington Post since 1911. After retiring, he worked briefly as a crime novelist. Flynn also became a scenario writer for the motion picture industry through his acquaintance with the actor King Baggot who, Dash notes, was considered the greatest film star in the country at that time in 1912. The producers Theodore and Leopold Wharton commissioned him to write story lines for their films, including The Perils of Pauline, and eventually adapted Flynn's experiences into a 20-part spy thriller titled The Eagle's Eye (1918), starring