Log to CSV utility