Use json to detect build state

Occasionally, build was finished according to json but the icon was not yet present causing nondeterministic failures