Reorder output file by classification a split out different classes