Added code to display invalid input

This will let user to edit the input if he/she accidentally entered a
invalid flag.