added os check for outputs