Prompt before leaving

If user changes work he is prompted to save his work before leaving.