refactor launcher handling of exit codes