Small improvement to the file finding logic.