Add some debug to the external process handling code