Improved behaviour with many (thousands) of input files.