Solving some bugs

1. show file name on window frame
2. ask for saving before exit each window.