Fix error message and returnvalue in fread