Fixed shell error logging