Magnetometer log code fixed.