you have the record delete and file delete behaviors both set to trigger on the delete button being pressed.
the problem is that code to delete the record happens before the code to delete the file, and the record delete is set to redirect after the delete, the redirect happens before the file delete code has a chance to trigger.
you will need to rearrange the code so that the file is deleted before the record is deleted.