Restore working version of copyFile for nhc98.