diff --git a/asdf-install.lisp b/asdf-install.lisp
index 9e72cbb4f5a6397cd1c855a2f681280840229c37..09e05a0b94346c02d7cde383fb6e37bc1f061202 100644
--- a/asdf-install.lisp
+++ b/asdf-install.lisp
@@ -269,8 +269,8 @@ an immediate concern
 			 (loop for p in packages
 			       unless (probe-file p)
 			       do (let ((tmp (temp-file-name p)))
-				    (download p tmp)
 				    (pushnew tmp *temporary-files*)
+				    (download p tmp)
 				    (setf p tmp))
 			       end
 			       do (format t "Installing ~A in ~A,~A~%" p source system)
@@ -289,7 +289,8 @@ an immediate concern
     (let ((*temporary-files* nil))
       (unwind-protect
 	   (run)
-	(dolist (l *temporary-files*) (delete-file l))))
+	(dolist (l *temporary-files*)
+	  (when (probe-file l) (delete-file l)))))
   (error (c)
     (princ "Install failed due to error:") (terpri)
     (princ c) (terpri)