code updated to continue execution until EOF(CSV file)