save downloaded js to tmp file