Add search_file and use it in search_directory