You stop and handle the dog the moment you read it has deviated from the straight line, giving the literal cast.
The dog needs to have been adequately taught the blind game. TT, Pattern Blinds, Blind Drills, Pattern Blinds With Diversions, Elementary Cold Blinds, etc... You would then begin to gradually introduce factors that cause a dog to deviate from a straight line. Wind, terrain, water, cover, and diversions are examples. As you progress, your casts also become less helping casts and more literal casts. Literal casting is giving the precise cast, that if taken correctly, will lead to the bird. So if you need an angle back, you give an angle back. If the dog digs straight back (no angle), you stop him, and give the literal cast again. You do not give an over cast to get the angle back.
By handling the dog using literal casting, it will learn to fight the factors that cause a dog to deviate from a straight line.
This is explained in Mike Lardy's TRT program and he has also written a Retriever Journal article in the topic (I believe it's in volume 1 of Mike's RJ articles). I highly recommend you get these resources.