diff --git a/cli_output.c b/cli_output.c
index 54b09a6..476b2bf 100644
--- a/cli_output.c
+++ b/cli_output.c
@@ -50,7 +50,7 @@
 		return 1;
 	}
 	if ((logfile = fopen(filename, "w")) == NULL) {
-		perror(filename);
+		msg_gerr("Error: opening log file \"%s\" failed: %s\n", filename, strerror(errno));
 		return 1;
 	}
 	return 0;
diff --git a/flashrom.c b/flashrom.c
index 14bb1b3..c11f723 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -29,6 +29,7 @@
 #endif
 #include <string.h>
 #include <stdlib.h>
+#include <errno.h>
 #include <ctype.h>
 #include <getopt.h>
 #if HAVE_UTSNAME == 1
@@ -1158,11 +1159,11 @@
 	struct stat image_stat;
 
 	if ((image = fopen(filename, "rb")) == NULL) {
-		perror(filename);
+		msg_gerr("Error: opening file \"%s\" failed: %s\n", filename, strerror(errno));
 		return 1;
 	}
 	if (fstat(fileno(image), &image_stat) != 0) {
-		perror(filename);
+		msg_gerr("Error: getting metadata of file \"%s\" failed: %s\n", filename, strerror(errno));
 		fclose(image);
 		return 1;
 	}
@@ -1174,7 +1175,7 @@
 	}
 	numbytes = fread(buf, 1, size, image);
 	if (fclose(image)) {
-		perror(filename);
+		msg_gerr("Error: closing file \"%s\" failed: %s\n", filename, strerror(errno));
 		return 1;
 	}
 	if (numbytes != size) {
@@ -1196,7 +1197,7 @@
 		return 1;
 	}
 	if ((image = fopen(filename, "wb")) == NULL) {
-		perror(filename);
+		msg_gerr("Error: opening file \"%s\" failed: %s\n", filename, strerror(errno));
 		return 1;
 	}
 
diff --git a/physmap.c b/physmap.c
index 5aa9874..4ebfb06 100644
--- a/physmap.c
+++ b/physmap.c
@@ -172,7 +172,7 @@
 	if (-1 == fd_mem) {
 		/* Open the memory device UNCACHED. Important for MMIO. */
 		if (-1 == (fd_mem = open(MEM_DEV, O_RDWR | O_SYNC))) {
-			perror("Critical error: open(" MEM_DEV ")");
+			msg_perr("Critical error: open(" MEM_DEV "): %s\n", strerror(errno));
 			exit(2);
 		}
 	}
@@ -192,8 +192,7 @@
 	if (-1 == fd_mem_cached) {
 		/* Open the memory device CACHED. */
 		if (-1 == (fd_mem_cached = open(MEM_DEV, O_RDWR))) {
-			msg_perr("Critical error: open(" MEM_DEV "): %s",
-				 strerror(errno));
+			msg_perr("Critical error: open(" MEM_DEV "): %s\n", strerror(errno));
 			exit(2);
 		}
 	}
@@ -250,7 +249,7 @@
 			descr = "memory";
 		msg_perr("Error accessing %s, 0x%lx bytes at 0x%08lx\n", descr,
 			 (unsigned long)len, phys_addr);
-		perror(MEM_DEV " mmap failed");
+		msg_perr(MEM_DEV " mmap failed: %s\n", strerror(errno));
 #ifdef __linux__
 		if (EINVAL == errno) {
 			msg_perr("In Linux this error can be caused by the CONFIG_NONPROMISC_DEVMEM (<2.6.27),\n");
@@ -302,7 +301,7 @@
 	msr_t msr = { 0xffffffff, 0xffffffff };
 
 	if (lseek(fd_msr, (off_t) addr, SEEK_SET) == -1) {
-		perror("Could not lseek() to MSR");
+		msg_perr("Could not lseek() MSR: %s\n", strerror(errno));
 		close(fd_msr);
 		exit(1);
 	}
@@ -315,7 +314,7 @@
 
 	if (errno != EIO) {
 		// A severe error.
-		perror("Could not read() MSR");
+		msg_perr("Could not read() MSR: %s\n", strerror(errno));
 		close(fd_msr);
 		exit(1);
 	}
@@ -330,13 +329,13 @@
 	buf[1] = msr.hi;
 
 	if (lseek(fd_msr, (off_t) addr, SEEK_SET) == -1) {
-		perror("Could not lseek() to MSR");
+		msg_perr("Could not lseek() MSR: %s\n", strerror(errno));
 		close(fd_msr);
 		exit(1);
 	}
 
 	if (write(fd_msr, buf, 8) != 8 && errno != EIO) {
-		perror("Could not write() MSR");
+		msg_perr("Could not write() MSR: %s\n", strerror(errno));
 		close(fd_msr);
 		exit(1);
 	}
@@ -362,7 +361,7 @@
 	fd_msr = open(msrfilename, O_RDWR);
 
 	if (fd_msr < 0) {
-		perror("Error while opening /dev/cpu/0/msr");
+		msg_perr("Error while opening %s: %s\n", msrfilename, strerror(errno));
 		msg_pinfo("Did you run 'modprobe msr'?\n");
 		return -1;
 	}
@@ -404,7 +403,7 @@
 	args.msr = addr;
 
 	if (ioctl(fd_msr, CPU_RDMSR, &args) < 0) {
-		perror("CPU_RDMSR");
+		msg_perr("Error while executing CPU_RDMSR ioctl: %s\n", strerror(errno));
 		close(fd_msr);
 		exit(1);
 	}
@@ -423,7 +422,7 @@
 	args.data = (((uint64_t)msr.hi) << 32) | msr.lo;
 
 	if (ioctl(fd_msr, CPU_WRMSR, &args) < 0) {
-		perror("CPU_WRMSR");
+		msg_perr("Error while executing CPU_WRMSR ioctl: %s\n", strerror(errno));
 		close(fd_msr);
 		exit(1);
 	}
@@ -445,7 +444,7 @@
 	fd_msr = open(msrfilename, O_RDWR);
 
 	if (fd_msr < 0) {
-		perror("Error while opening /dev/cpu0");
+		msg_perr("Error while opening %s: %s\n", msrfilename, strerror(errno));
 		msg_pinfo("Did you install ports/sysutils/devcpu?\n");
 		return -1;
 	}
