Wait for the user to save a file (xml/datagrid/file saving)

I got a little issue and i can’t think of a nice way to fix it :

To quickly explain things:
step1- I got an xml that is locally loaded(works fine)
step2- the content goes into a datagrid that is displayed (works fine)
step3- In AS3 I dynamically add some lines to this xml file(works fine)
step4- I save it locally (works fine)
step5-and want the datagrid to be updated…(works not-so-well)

So, in step 4, the data is saved into the xml file, but in order to finish the save, the user has to click on the “Save as” windows in order to have the file updated of course… and that’s where’s my problem, how can i tell flash to wait till the user actually saves the file, before reload the xml file in the datagrid ? here’s the code :


//called when the user click to add the new line in the xml file
function add_button_clicked(event:MouseEvent) {
           //here the new line inserted in xml  (STEP 3)
             var node:XML;
            node = <fact fourn={nom.text} />;
//here the code to save it to the disk (STEP4)
             var ba:ByteArray = new ByteArray();
            var fr:FileReference = new FileReference();
//HERE a window will be logically displayed with "do you want to write onto file.xml ?"
            fr.save(ba, "file.xml");
          //here code to load the xml file and display it in the datagrid (STEP5)
//but this is executed BEFORE the user clcik on the rewrite window

So we see that in my step 5, i need to wait that the user actually click yes before loadCat(file.xml) is executed…and I don’t know how…