Use errorMsg rather than fprintf.
diff --git a/sed.c b/sed.c
index 770a56e..3a7360f 100644
--- a/sed.c
+++ b/sed.c
@@ -207,8 +207,8 @@
 		idx++; /* so it points to the next character after the last '/' */
 	}
 	else {
-		fprintf(stderr, "sed.c:get_address: no address found in string\n");
-		fprintf(stderr, "\t(you probably didn't check the string you passed me)\n");
+		errorMsg("get_address: no address found in string\n"
+				"\t(you probably didn't check the string you passed me)\n");
 		idx = -1;
 	}
 
@@ -612,7 +612,7 @@
 		for (i = optind; i < argc; i++) {
 			file = fopen(argv[i], "r");
 			if (file == NULL) {
-				fprintf(stderr, "sed: %s: %s\n", argv[i], strerror(errno));
+				errorMsg("%s: %s\n", argv[i], strerror(errno));
 			} else {
 				process_file(file);
 				fclose(file);