This looks suspicious. If I read the code correctly, it's loading file contents from local storage, then calls remote download and discards the downloaded data. Huh?