refactor(cli): move version option check 

Do the check for the version option in the optimize check function