Control of H2O generated during the CO2 hardening process in a casting mold