mergeAllFiles optimized.