Update superagent.py

corrected write to file