avoid a potential fatal error when using a stream after session closed
use the cnd writer to handle NodeType objects
fix the importer to not stumble over exported jcr:root node