Added the ordering of problems to the output file