Exit wrapper with appropriate status code