keep xmlwriter optional