remove exit if check from main and move it to Command