A method of operating a gaseous fuel internal combustion engine , the internal combustion engine comprising an injection device configured to supply a pilot injection of liquid fuel to a cylinder of the internal combustion engine for combustion with a mixture of gaseous fuel and air in a combustion chamber of the cylinder , the method comprising: introducing a mixture of gaseous fuel and air into the combustion chamber ; injecting a first amount of liquid fuel into the combustion chamber via the injection device in a combustion cycle of the internal combustion engine ; performing at least one measurement relating to the combustion of the first amount of liquid fuel and the mixture of gaseous fuel and air in the combustion chamber ; determining at least one combustion parameter based on the at least one measurement; comparing the combustion parameter to a desired combustion parameter; and adjusting at least one of an amount of liquid fuel injected by the injection device and an injection timing of the liquid fuel in a subsequent combustion cycle when the combustion parameter differs from the desired combustion parameter by more than a predetermined amount, characterised in that the step of determining the at least one combustion parameter includes determining a combustion profile for the cylinder based on the at least one measurement, wherein the step of comparing the combustion parameter to a desired combustion parameter includes comparing the combustion profile to a reference combustion profile determined in advance for a reference operating condition of the internal combustion engine and wherein a plurality of reference combustion profiles is provided, the method further comprising selecting one of the plurality of reference combustion profiles based on a current operating condition of the internal combustion engine , the current operating condition specifying at least one of a fuel quality of the gaseous fuel, a fuel quality of the liquid fuel, an ambient air temperature, an ambient air pressure, an ambient air humidity, and an engine load. introducing a mixture of gaseous fuel and air into the combustion chamber ; injecting a first amount of liquid fuel into the combustion chamber via the injection device in a combustion cycle of the internal combustion engine ; performing at least one measurement relating to the combustion of the first amount of liquid fuel and the mixture of gaseous fuel and air in the combustion chamber ; determining at least one combustion parameter based on the at least one measurement; comparing the combustion parameter to a desired combustion parameter; and adjusting at least one of an amount of liquid fuel injected by the injection device and an injection timing of the liquid fuel in a subsequent combustion cycle when the combustion parameter differs from the desired combustion parameter by more than a predetermined amount, characterised in that the step of determining the at least one combustion parameter includes determining a combustion profile for the cylinder based on the at least one measurement, wherein the step of comparing the combustion parameter to a desired combustion parameter includes comparing the combustion profile to a reference combustion profile determined in advance for a reference operating condition of the internal combustion engine and wherein a plurality of reference combustion profiles is provided, the method further comprising selecting one of the plurality of reference combustion profiles based on a current operating condition of the internal combustion engine , the current operating condition specifying at least one of a fuel quality of the gaseous fuel, a fuel quality of the liquid fuel, an ambient air temperature, an ambient air pressure, an ambient air humidity, and an engine load. <EOS>