You might look online - there used to be screened covers to order that you could put over plates and platters of food to keep flies off. They might be worth your while. Flies are going to come in and out of your house if the door is left open, and there isn't much you can do about that except to keep the door closed. Your main concern, though, is to keep them out of your food, because they certainly do it no good. I don't think dogs and cats have anything much to do with houseflies. Flies are only interested in feeding themselves. That's why they hang (well, fly) around picnic tables and garbage cans. (Make sure your garbage cans aren't too near your picnic or patio table, by the way.)