eliminate duplicat doc directory in preprocessing script