New function stateFile to handle the unsaved  file. isIOTFile is changed to be checked in the stateFile function
New function stateFile to handle the unsaved  file.
isIOTFile is changed to be checked in the stateFile function

gepd/Deviot,gepd/Deviot