A comment would be helpfull about the logic being different for concatenated files