Index: uspace/lib/posix/stdio.c
===================================================================
--- uspace/lib/posix/stdio.c	(revision c67aff2b73c9636ea0c229cdbf3bfc48af966545)
+++ uspace/lib/posix/stdio.c	(revision e0e922d523b4ec1bf5cfea5e330ce8ba19e59850)
@@ -257,5 +257,5 @@
 	assert(stream != NULL);
 	
-	/* Retieve the node. */
+	/* Retrieve the node. */
 	struct stat st;
 	int rc;
@@ -265,4 +265,13 @@
 	} else {
 		rc = stat(filename, &st);
+		if (-rc == ENOENT) {
+			/* file does not exist, create new file */
+			FILE* tmp = fopen(filename, mode);
+			if (tmp != NULL) {
+				fclose(tmp);
+				/* try again */
+				rc = stat(filename, &st);
+			}
+		}
 	}
 	
