Exit action on top right corner X works

Prompt displayed if changes made or opt files not saved.