I'm not completely sure that a failed open() call cannot leave an entry in the file system. On the other hand, buffering is the most likely cause of this "failure" (I expected the OP to have read the file after killing the process, which would have resulted in output if buffering is the problem).