Added sorting to performOnFilesInArchive, refactored performOnDataInArchive to use it