Added catch for EOFError