Adding wait command to allow wget to finish