add exception to deal with EOFError