added a function to generate filter responses and save them to files