replace shellcmd cp with call to copy_file.