refactored the error messages
refactored the error messages