Shouldn't this call be done somewhere else - it seems strange in this loop, and should the timeout be configurable in the globals file?