Allows only one version of the app to be open at a time.

        If you are calling create_cfg() before calling this,
        you don't need to give a path. Otherwise a file path must be
        given so we can save our file there.

        Set appdata to True to run uac_bypass on the path, otherwise
        leave it as False

def check_if_open(self, path=None, appdata=False, verbose=False):
        '''
        Allows only one version of the app to be open at a time.

        If you are calling create_cfg() before calling this,
        you don't need to give a path. Otherwise a file path must be
        given so we can save our file there.

        Set appdata to True to run uac_bypass on the path, otherwise
        leave it as False
        '''
        #~ To know if the system crashed, or if the prgram was exited smoothly
        #~ turn verbose to True and the function will return a named tuple  # TBD
        #~ if os.name == 'nt':
        #~ hwnd = int(self.root.wm_frame(),0)
        #~ #saving a hwnd reference so we can check if we still open later on
        #~ with open (self.check_file,'a') as f:
        #~ f.write(str(hwnd))
        #~ logging.info('adding hwnd to running info :'+str(hwnd))
        #~
        logging.info('Checking if our app is already Open')
        if not path and self.cfg:
            self._check_if_open_using_config()
        elif path:
            if appdata:
                file = path.split(os.sep)[-1]
                self.check_file = self.uac_bypass(file=file)
            else:
                self.check_file = path
            self._check_if_open_using_path()

        self.shutdown_cleanup['release_singleton'] = self.release_singleton