I agree that the function could be clearer. Therefore, I changed the name of the function to randomize_list, set it to read from the filename given by url_file (the list downloaded to the router), and modified it to write the output to the filename referred to by input_file