change copySync to copy