Ok, that removed the error but it doesn't delete the file when I check the box.
What should the value of the check box be? Maybe that's where I went wrong.
One other thing, the delete file behavior does not show up in the behaviors list using that code. Is that an issue?