exit after execution of cmd