If the table contains indexes, loop through them and check their statuses as well.
Merge pull request #5 from dylanclementas/check-index-state-update-and-wait

Check index status in updateTableAndWait