Throwing error if cmd.run arguments are invalid