Asking about saving before closing was added (not working when clicking on X)