OK, here I found a solution in case I have two shell commands and I want them to perform synchronously,i.e., command2 (process 2) will begin to execute once process 1 (command1) terminates:
http://www.vbforums.com/showthread.php?t=74473

Anyone knows what to do if instead of command1 I have a function, like in my case (see above!)?

Thanx