fixes and better logging for csv parse errors.