Use perrorMsg instead of perror and keep removing files if we encounter
an error.
diff --git a/utility.c b/utility.c
index 9ae2a8f..7c41ab8 100644
--- a/utility.c
+++ b/utility.c
@@ -641,7 +641,7 @@
 				"status=%d followLinks=%d TRUE=%d\n",
 				status, followLinks, TRUE);
 #endif
-		perror(fileName);
+		perrorMsg("%s", fileName);
 		return FALSE;
 	}
 
@@ -666,13 +666,13 @@
 
 		dir = opendir(fileName);
 		if (!dir) {
-			perror(fileName);
+			perrorMsg("%s", fileName);
 			return FALSE;
 		}
 		if (dirAction != NULL && depthFirst == FALSE) {
 			status = dirAction(fileName, &statbuf, userData);
 			if (status == FALSE) {
-				perror(fileName);
+				perrorMsg("%s", fileName);
 				return FALSE;
 			}
 		}
@@ -699,13 +699,13 @@
 		}
 		status = closedir(dir);
 		if (status < 0) {
-			perror(fileName);
+			perrorMsg("%s", fileName);
 			return FALSE;
 		}
 		if (dirAction != NULL && depthFirst == TRUE) {
 			status = dirAction(fileName, &statbuf, userData);
 			if (status == FALSE) {
-				perror(fileName);
+				perrorMsg("%s", fileName);
 				return FALSE;
 			}
 		}