Interesting. My experience is limited to Ubuntu, RedHat and Solaris. To the best of my knowlege, none of them would allow a file to be deleted while it is still opened and being written, but the difference is trivial since the result would appear as you suggested if there was a continual append process happening. Short of examining and testing the actual script, I can only suggest things which people might check to resolve their problems.

Your earlier suggestion about using fuser is relevant to determining if the file is still opened before attempting to delete it. I maintain that waiting for the file to close (permanently) is the appropriate answer. Using all your suggestions to determine if the file is not currently opened, and then deleting the file should resolve the problem regardless of whether you can delete an open file or not.