add validation to command execution