not waiting

I have a script that runs Compressor and converts the file then I want it to inject the file with Flvtool2. My script works fine but the flvtool2 is starting too early. I have tried to put it in the background by putting a "&" sign at the end and then put a "wait" on a new line. Anyone have any other tips?

If starting to early, can you check for file existence before starting?

can you do something like

if [ -s my_important_file ]
  then
    blah blah
fi

you might want to put that in a loop to keep trying until success
also, inside the loop you might try a wait 60 (to delay 60 seconds before trying again.)

It still doesn't wait. I think the problem is it creates a flv file when it is encoding so there technically is a file there. Any suggestions around this?