bug in fread(3) error check