Change to use a file manage rather than a list of filenames