added option to wrte the linked list from the file and read it from the file