made CSV encoding detection more robust
don't print debugging output when reading a CSV