How to subscribe to home workspace closing event?

On Dynamo Github if you want to start a new issue, it now says:“If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.” I used to go there for help with developing UI custom nodes. And I don’t have the impression there are programmers around here? Are there?

Anyway, I would like to find out how I can subscribe to an event when the home workspace is closing and if certain condition is not true how to cancel the closing. In this case I have users type some information in a DataGrid and want to warn if they close the workspace that they loose this information if it was not written to a csv file.