Updated the copy and patch script