add validation to command line tool