write downloadFiles to /tmp and rename them when the download finished to avoid corrupted downloads at the destination;