write xml out to external storage for debug