Double check EOF when parsing so that streams don't hang