Add some error checking code to the soap library.