Tragedy nearly averted after driver loses control of truck