Write, readDescriptor, close methods are added.