Added a function to read file list.txt