Flies are attracted to the manure, so you might need to alter the way you manage it.
I use boot trays to collect droppings at night and empty these out into our composter every morning. Flies were hanging around the composter until I read you should fork over the compost every day after you add fresh material, and once I started doing this, the fly problem went away.
If you start a biopod with black soldier flies, they keep house flies and horseflies away, but then you do have the soldier flies buzzing around. They don't eat as adults, though, so they're not nasty like the other kinds of flies.