code: def close(self):
          
          os.remove(self._file)
          os.rmdir(self._dir)
          self.thread._exit = True
          self.thread.join(1000)
          self._close()
docs: Terminate the agent, clean the files, close connections
          Should be called manually