added validate cmd and some nice flags