A good biting fly defense is to apply the insect repellent permethrin to a hat. This worked well for me some years ago when I was working on a road paving crew in rural Wisconsin. Biting flies, such as black flies, seem to swarm to the highest point. Permethrin is actually an insecticide that is approved for application to clothing and kills insects that come in contact. It is actually the active ingredient in lice shampoo and is registered with the FDA for skin contact but skin deactivates permethrin within 15 minutes.
This works good for knats too.