Index: uspace/app/klog/klog.c
===================================================================
--- uspace/app/klog/klog.c	(revision e175d69c617c81c9a4cfc0671129660b34333ff4)
+++ uspace/app/klog/klog.c	(revision f9061b499e4439544d82ae29d075f8782dde1065)
@@ -74,4 +74,6 @@
 		fsync(fileno(log));
 	}
+	
+	event_unmask(EVENT_KLOG);
 }
 
@@ -111,11 +113,4 @@
 	}
 	
-	rc = event_subscribe(EVENT_KLOG, 0);
-	if (rc != EOK) {
-		fprintf(stderr, "%s: Unable to register klog notifications\n",
-		    NAME);
-		return rc;
-	}
-	
 	log = fopen(LOG_FNAME, "a");
 	if (log == NULL)
@@ -124,4 +119,14 @@
 	
 	async_set_interrupt_received(interrupt_received);
+	rc = event_subscribe(EVENT_KLOG, 0);
+	if (rc != EOK) {
+		fclose(log);
+		fprintf(stderr, "%s: Unable to register klog notifications\n",
+		    NAME);
+		return rc;
+	}
+	
+	event_unmask(EVENT_KLOG);
+	
 	klog_update();
 	async_manager();
