Save-cancel on closure working. Doesn't exit app unless document is closed.