Detect failing build on the running stage