Updated product build script to check task status