fixed bug in xml file saving - did not report failure when write access was not granted