Add wait at the end of gen-facts.sh