correct shell error mgmt