Updated: Output redirected to CSV file.