Hi Dan, Nice to hear from you.
Lots of worm growers suffer from flies and complain to the various Facebook groups. They get a load of chemical cures that I don’t agree with, such as diatomaceous earth or mosquito dunks. Freezing the food is suggested to kill fly eggs and you are reminded to bury the food. Neither of these give long term relief because it’s hard to be perfect every time you feed the wormy babies.
I instead suggest you block the flies with a dry top layer. Fungus gnats, fruit flies, house flies, and Black Soldier Flies all lay eggs in the moist bedding. If they can’t reach your bedding they can’t lay eggs and the swarm goes away.
To do this start with a worm blanket. That’s a sheet of any kind. Some use newspaper or cardboard but those get wet and sloppy. Some use a plastic sheet but that can make your bin too wet. I sell a ‘Worm Filter’ that is a plastic mesh, it works well and has other uses. Cloth also works well, it is called a worm blanket after all. Over that sheet put a 2 to 4 inch layer of newspaper strips. Hand tear into approximately one inch strips. Shredder paper is cut too fine for this. That sheet separates the wet bed from the dry layer and the dry layer gets rid of the bugs. It can take a week for the residual eggs to hatch out. Eventually the dry layer gets wet. When it does, stir the wet paper into the bedding and make a new dry layer. This dry layer technique works in my various types of worm bins.