Error messages added to main for nbOfTerms() and readTerm()