Implemented confirm to quit when modifications has been made.