added error messages for user input