Tim,
I think you will still need your pk - what if a file is put in twice
I would - to decrease the odds
(1) Not process any file that is say less than a minute or so old
(2) lock the file prior to processing it. If you cannot lock it - skip it for the moment
(3) after deletion of the file - verify it's no longer there
or, is there any means of processing them immediately instead of saving them to file first ?
Success,
Gregory