Changed clientNum to a global variable to make it accessible by the onFinishDownload function.