Download: Fix data loss when rename fails. #2428