Write ordered list back to file