Opened a file, read list and read each element of list