Please find attached a patch to implement the FileClosing event as per feature request https://sourceforge.net/tracker/?func=detail&aid=3472568&group_id=95013&atid=609911.
I've included your patch and have enhanced it. Plugins may now cancel the closing process (by setting Cancel of the file closing event args to true). Moreover, there are two file closing events: one before (automatic) saving and one afterwards. See Patch.txt.
Thanks and best regards