I have a script which changes to a new tor identity. Also note that the torrc file has the text: ControlPort 9051