[dev][err] stage commit, add warning on closing modified file
[dev] fix some bugs. some enhancement to make user happier

add reopen function. fix a bug when saving with empty filenane
unsave files alert on exit.