When dealing with infestations of anything, the availability of food, water, and housing, will continue to bring pests back into your home looking for more, not to mention it will encourage them to invite their friends and family to their new home. As the saying implies, if you give a pest something to eat, they will indeed want something to drink. If both of these items can be found, the pests will be likely to set up a comfortable home right where they first found the food, in your home!
In order to prevent such problems, be sure to keep all food handling areas clean, and avoid the availability of water resources (fix leaky sinks, etc.). When it comes to most pests, cleanliness is vital, though it is crucial for extermination of any sort. Make your home as unwelcoming to unwanted pests as possible, and leave the cookies safe in the cookie jar!