fix reverse logicerror in copyFiles