[main] Use ConfigManager to get the value of copyOnDemand.