save exitcode in $?
adding debug statements