Updated dirty logic and file save confim dialog
Updated core logic