--- a/daemon/opd_mangling.c
+++ b/daemon/opd_mangling.c
@@ -157,7 +157,12 @@
 
 	verbprintf(vsfile, "Opening \"%s\"\n", mangled);
 
-	create_path(mangled);
+	err = create_path(mangled);
+	if (err) {
+		fprintf(stderr, "oprofiled: create path for %s failed: %s\n",
+		        mangled, strerror(err));
+		goto out;
+	}
 
 	/* locking sf will lock associated cg files too */
 	sfile_get(sf);