codec package doesn't throw io.EOF - so give up this chcking