Updated product build script to check task status every five seconds