New features to the code

I added the output file, to see the sort values.