For example, if using Symfony, this is probably that first thing you'll see after installing, because the logs directory won't be writable. So, ideally, it should be clear enough that the user knows to change the permissions on the directory. Many developers might not understand the idea of a "stream", but they do understand a file not being writable.
I encounted the case $this->stream = 0 when close method was called,
I think the caller condition may be wrong in this case.
But stronger check for the $this->stream parameter makes sense I think.