Food attracts them, especially fruit attracts the tiny black flies. Additionally, dirty pet litter will attract black flies. Keeping these items clean and making sure your screen doors are in good working order will help. The Pest Strip or flypaper will catch most of the ones which remain. Pesticides are smelly and ineffective against these pernicious pests.