Place it right after the mistake is shown and before the fallout, letting it act as the turning point in a short edit. Follow it with Fail Sound Meme to underline the failure, or open with It Was At This Moment He Knew to build the setup before the trouble is announced.