First you remove all the food and substrate, then clean the container. Wash it with diluted bleach, to kill any mold spores. Or start with a new container, if you have something suitable.
Make sure the new setup has lots of air circulation. Like I mentioned, high humidity will let any grain mites thrive. It's hard to avoid the mites once you have some. They'll even transfer over with the beetles and worms.
Check the food you're using, see if it's got signs of mites before you even add it to the worm bin. If you see any signs of fine dust 'moving', don't use it. You could microwave it for a few seconds to kill them, but I don't know how long that would take. You'd have to keep an eye on it to make sure it doesn't get scorched or go up in flames.
If you're adding a lot of veggies for moisture, it sure could be mites that are causing it.
I keep mine in a 10 gallon tank withe screen lid, and use a whole potato, not veggie or fruit chunks. The potato skin keeps the moisture inside, doesn't let it escape into the bin. The worms and beetles have no problem eating through the skin, into the potato to get their moisture. Over time, as they eat the potato, there will be spots where the moist insides are exposed to the substrate, but it's minimal. By that time, the worms have already eaten most of the inside, so there's not much moisture to escape and raise the humidity in the bin.
Doing it this way also keep the moist (or wet) areas around the potato, so there's less chance for the rest of their food to go moldy.
The important part is low humidity. You'll have to do whatever it takes to achieve that. I don't know what you're using to raise the worms, so I can't suggest what kind of lid to put on. If it's a tank or rubbermaid type bin, then lay a screen top on it. Cheesecloth would work, as long as it's high enough above the worms and beetles, so they can't chew it.