debugging exit status issue