modified warning and error message