A "File exists" error always occurs if the following steps are followed.
1. Link to a file in an assignment.
2. Save the assignment.
3. Edit the assignment and remove the link to the file.
4. Save the assignment.
5. Edit the assignment and attempt to link to the original file.
This is a serious issue because the workaround (replacing the assignment with a new one) involves data loss if some students have already submitted work. The workaround may also not be evident since the error suggests that the issue is with the file.