There are other problems with hydrogen gas such as leakage, reactivity, and transportation. Hydrogen is not the magical fix for the environment.
Hydrogen gas at combustion temperatures produces very caustic acids and bases depending on whatever else is there such as nitrogen, sodium, etc.
No container holds hydrogen perfectly; so there will tend to be a developing flammable hydrogen cloud around the storage container.
Safest way is combine the hydrogen with carbon, then burn that compound.
None of these is particularly problematic. It ain't rocket science to use hydrogen with minimal leakage--it has been done successfully for years. From a reactivity standpoint, hydrogen is less dangerous than gasoline (hydrogen has a wider explosive range and lower ignition temp, but because of its high permeation rate and low density, it is less likely to accumulate to within those explosive limits). Transportation over long distances can be done in existing natural gas pipeline infrastructure.
"There are other problems with hydrogen gas such as leakage, reactivity, and transportation."
And gasoline is better how?