Optimize find and other functions by restricting files being read