+1 on the vinegar. Cleanliness may be next to Godliness but it isn't a guarantee against fruit flies. If you have fruit, you can get fruit flies (hence the name) even if you keep the area spotless. We always have a bowl of fruit in our kitchen (where I brew and bottle). They especially seem to like bananas. For me, they are mainly an issue during bottling. I actually had a couple of aceto infections before I realized that fruit flies carry acetobacter.
Now I use a couple of small bowls of cider away from my bottling area and keep a cover on my bottling bucket. I always keep my BK covered during cooling and transfer.