Support ext option
Added exit code with misstakes
Exit with code