writing the sorted data to a file
renamed a file