Fixed bugs in api.downloadFile().