Which is absolutely correct. The XML is really managed by the binding and shouldn’t be something that anyone should worry about.
Not necessarily. The XML is written when there is information to write. If the binding hasn’t received information about the device, then it won’t write the file. The XML gets written at a couple of points during discovery - once initialisation is complete and it has all the information it needs from the device, then yes, it will normally always be written when the binding closes.
I hope that helps.