There have got to be easier ways of signalling completion of the results file. One well-known way is to number them and create a .done file when complete. The requesting process only has to see the .done file via an ftp ls to know the results file it refers to is complete.