'Koch' Documentary and Ed Koch This morning, the filmmaker Neil Barsky awoke to shocking news: the former New York City mayor Ed Koch had died. It also happens to be the day that his new documentary about the mayor, Koch, opens in theaters. "It's an insane, surreal day," Barsky told TIME. Obviously when you open a film you want attention. You don't want this kind of attention. Barsky began filming Koch, which he originally intended as a look back at how Koch's work sowed the seeds of the city's economic growth, in 2010, when the mayor was working on a campaign to reform Albany. But in the years between then and early 2012, when the movie was completed, its focus changed, as the camera captured a man grappling with his legacy and mortality. "When we filmed him, he was extremely vital and dynamic, and that was one of the things that was very impressive about him," says the director - but adds that shortly after filming wrapped, Koch began to use a cane. His health started deteriorating in the last couple months. Although Barsky says that the spotlight-craving mayor didn't have much of a private side, his documentary - which A.O. Scott at the New York Times calls "hardly an uncritical account of Mr. Koch's dozen years as mayor" - does offer a glimpse at the mayor's personal life. Barsky points to a scene filmed at a family Yom Kippur break-fast meal, during which Koch argues with his nephew over the controversial 2010 proposal to build a mosque near the site of the World Trade Center. Koch believed that the mosque's backers had the right to build but should choose not to; he was bested with the counterargument that he wouldn't want somebody to say where he should build a synagogue. "That was the only time I ever saw somebody get the better of him in a debate," says Barsky. Even though he still was Mayor Koch, even in the family, it was the only time that he wasn't larger-than-life. MORE: Ed Koch: Mayor - and Movie Critic Koch was not the mayor's first time on screen: he had acted in an episode of Spin City and several movies, in addition to appearing as himself on TV shows like Sex and the City, in movies like The First Wives Club and The Muppets Take Manhattan, and for two years as the presiding judge on The People's Court. And he was happy to share what he learned from those experiences. The last time he and Barsky spoke was by phone a few days ago, when Koch was in the hospital and unable to make it to the movie's premiere. Koch was optimistic about his chances of being released within the week, and Barsky remembers the mayor's advice for the big event. Hizzoner's final words of wisdom for the director: "Don't let the applause go to your head."