Updated for online repetative calls

Repeatedly calls the API and attemps to try over and over writing to a text file.