We know that the mass of the log before burning is 5 kg.
After it is burnt, the mass of the ash comes out to be 1 kg. So there is a
definite mismatch of 4 kg. When the log is burnt, there is the formation of
smoke. The air and water present in the wood vaporises to reduce the weight
significantly. The combustion actually leads to the formation of carbon dioxide
that mixes with the air and also water. The extra mass thus goes into the
formation of carbon dioxide and water.