Sorting ,saving, loading  to and fro file now works.