Added more xml handling and getting stdout stderr and exitcode