Download to a tempfile and rename if successful