catch EOFError