I used Quick Bayt outside my pen. It is a granule bait that I put in a pan outside my pen, and when they eat it the flies die. I sometimes put something that the flies like, to help get them to the bait.
That works good. I use it in my barn where I milk. Just have to keep it out of reach of dogs. It will work on coons and squirrels as well if they are a nuisance in the garden. Just mix with a little pepsi or coke in a bowl and bury in ground a bit. They won't go 3 steps if they ingest it.