problem with fwrite

guys this one is the same problem with net/socket (Version 1), the !$written sometimes is 'converted' to false, instead of !$written, check if it's === false
Merge pull request #1 from rspadim/patch-1

problem with fwrite