sort files before joining to ensure that random peeks would not change ordering