def threadRun (self):
        """run method of the thread
        
        This method will run as a separate thread which will handle the file overwrite function.
        
        :Parameters:
            - None

        :Returns:
            - None
        
        Setting the threadFlag so that any accidental duplicate spawning doesnt occur.
        """
        
        self._threadFlag = True
        print('Maximum entry count exceeded. Starting the '\
                        + 'Write thread..')
        
        
        try:
            
            try:
                """ Checks whether the files exist """                
                if(os.path.exists(self._actionLogName)):
                     
                    """ if 4th bak file exists remove it """
                    if(os.path.exists(self._actionLogName + OLD_FILE_TUP[3])):
                        os.remove(self._actionLogName + OLD_FILE_TUP[3])
                        print('Removing %s file' \
                                          %self._actionLogName + OLD_FILE_TUP[3])

                    """ Renaming the bak files to accomodate the new file """  
                    for index in range(2, -1, -1):
                        if(os.path.exists(self._actionLogName \
                                                            + OLD_FILE_TUP[index])):
                            os.rename(self._actionLogName + OLD_FILE_TUP[index],
                                      self._actionLogName + OLD_FILE_TUP[index + 1])
                    os.rename(self._actionLogName, self._actionLogName \
                                                                  + OLD_FILE_TUP[0])
            except IOError:
                printException()
                
            """ Making the entry count to 0 """                
            self._maxEntryCount = 0
        finally:
             """ Clearing the threadFlag when the thread ends """        
             self._threadFlag = False
run method of the thread
        
        This method will run as a separate thread which will handle the file overwrite function.
        
        :Parameters:
            - None

        :Returns:
            - None
        
        Setting the threadFlag so that any accidental duplicate spawning doesnt occur.
        
recipes/Python/440477_Writes_logfiles_and_keep_backups/recipe-440477.py