modify code, now getfilesize will send request to remote server rather than proxy server