print the files in the correct order