You can change your script to this if all your items are guaranteed to exist before the script runs. However, I suspect since you are using it from within a target that they don't. In which case you might have to resort to the CreateItem task.