You need to allow time for the email to be sent.
Figure 60 seconds or 60 seconds plus your spool interval (if
spooling is on (it should be)) -- whichever is larger.
It would be better not to delete the file here.
Set up a scheduled task that deletes files in the target
directory that are, say, 24 hours old.