collect returncode