diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c
index ff99173..dc9bfa4 100644
--- a/fastboot/fastboot.c
+++ b/fastboot/fastboot.c
@@ -158,6 +158,7 @@
     char *data;
     int sz;
     int fd;
+    int errno_tmp;
 
     data = 0;
     fd = open(fn, O_RDONLY);
@@ -178,8 +179,10 @@
     return data;
 
 oops:
+    errno_tmp = errno;
     close(fd);
     if(data != 0) free(data);
+    errno = errno_tmp;
     return 0;
 }
 #endif
@@ -300,7 +303,7 @@
 
     kdata = load_file(kernel, &ksize);
     if(kdata == 0) {
-        fprintf(stderr, "cannot load '%s'\n", kernel);
+        fprintf(stderr, "cannot load '%s': %s\n", kernel, strerror(errno));
         return 0;
     }
 
@@ -320,7 +323,7 @@
     if(ramdisk) {
         rdata = load_file(ramdisk, &rsize);
         if(rdata == 0) {
-            fprintf(stderr,"cannot load '%s'\n", ramdisk);
+            fprintf(stderr,"cannot load '%s': %s\n", ramdisk, strerror(errno));
             return  0;
         }
     }
@@ -566,7 +569,7 @@
     } else {
         unsigned int sz;
         data = load_file(fname, &sz);
-        if (data == 0) die("cannot load '%s'\n", fname);
+        if (data == 0) die("cannot load '%s': %s\n", fname, strerror(errno));
         fb_queue_flash(pname, data, sz);
     }
 }
@@ -594,7 +597,7 @@
     fb_queue_query_save("product", cur_product, sizeof(cur_product));
 
     zdata = load_file(fn, &zsize);
-    if (zdata == 0) die("failed to load '%s'", fn);
+    if (zdata == 0) die("failed to load '%s': %s", fn, strerror(errno));
 
     zip = init_zipfile(zdata, zsize);
     if(zip == 0) die("failed to access zipdata in '%s'");
@@ -664,12 +667,12 @@
     fname = find_item("info", product);
     if (fname == 0) die("cannot find android-info.txt");
     data = load_file(fname, &sz);
-    if (data == 0) die("could not load android-info.txt");
+    if (data == 0) die("could not load android-info.txt: %s", strerror(errno));
     setup_requirements(data, sz);
 
     fname = find_item("boot", product);
     data = load_file(fname, &sz);
-    if (data == 0) die("could not load boot.img");
+    if (data == 0) die("could not load boot.img: %s", strerror(errno));
     do_send_signature(fname);
     fb_queue_flash("boot", data, sz);
 
@@ -682,7 +685,7 @@
 
     fname = find_item("system", product);
     data = load_file(fname, &sz);
-    if (data == 0) die("could not load system.img");
+    if (data == 0) die("could not load system.img: %s", strerror(errno));
     do_send_signature(fname);
     fb_queue_flash("system", data, sz);
 }
@@ -849,7 +852,7 @@
         } else if(!strcmp(*argv, "signature")) {
             require(2);
             data = load_file(argv[1], &sz);
-            if (data == 0) die("could not load '%s'", argv[1]);
+            if (data == 0) die("could not load '%s': %s", argv[1], strerror(errno));
             if (sz != 256) die("signature must be 256 bytes");
             fb_queue_download("signature", data, sz);
             fb_queue_command("signature", "installing signature");
