Waiting for the bash script to return