using copy instead of copyfile