Use Tie::IxHash to preserve message id order, so strings from same file will be grouped together.