Download remote file to a temp file first, in case the download progress is interrupted. Added accept filter to ignore .tmp file