Function to search dir for files