Add function to collect lists of files