debugging exit status issues