Improve error message on invalid user input