Make wrapper exit with appropriate status