if (controller.getDocumentPool().find(documentKey.toString()) != null) {
dynamicError("Cannot write to a URI that has already been read: " + documentKey.toString(), "XTRE1500", context);
}
if (!controller.checkUniqueOutputDestination(documentKey)) {
dynamicError("Cannot write more than one result document to the same URI: " + documentKey.toString(),"XTDE1490" ,context);
} else {
controller.addToResultDocumentPool(documentKey, doc);
//controller.addUnavailableOutputDestination(documentKey);
}