Photoshop does not trigger the Start Save Document event from the Scripts Events Manager when you try to close the document and select YES in the unsaved changes dialog. Saving starts of course, but the event is not triggered.
I expanded this thread of that where it started as I thought the problem you met over there made you to make current post: "By using the Start Save Document event in the Script Events Manager, my script runs right after the save starts, not before. Do you have any idea how to get around it?"