Modified FileSegmentManagedBuffer#nioByteBuffer to check null or not before invoking channel.close