Fixed error code transmission from the shell script