Script adjusted to aggregate exit statuses.