try to wait within the script and enable some debugging

Change-Id: Iec6c772819527c675834b6150e01184958026f00