changing method copyFiles