finished build_file_list function