Sort temporary files