Re-arrange while loop per OTI bug #575

Move "a = Web100Agent()" above while loop to fix memory leak