Make sure correct exit code is raised from cli