fgets only reads one line at a time. In a csv with new lines, it needs to be read line by line.