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