Updated shell call logic