Say, I preheat 50ml of 98% $\ce{H2SO4}$ and proceed with adding 25ml of 85% $\ce{HCOOH}$. The result of which is:
$$\ce{H2SO4 + HCOOH -> CO + H2O}$$
Sulfuric acid will dehydrate formic acid producing $\ce{CO}$, however, gas could still be contaminated with vapor. What is the correct way of removing these impurities?