sort by name/seq, then by tmpfile number. This will assure that the reads are written in the same order that they appear in the original file (for merged paired-end reads, etc...)