Add App and Command argument count checking

Alternative version.