add flags for file to listener