test through EOF/ERROR