This function is wrong.  You've already called `allocDescriptor` by virtue of calling `fs.open`