replaced copy with copyfile
replaced copy with copyfile