Save the state of servers and channels to a file on exit