Adding EOFException

passing error to displayMessage