Added condition so that errors are only recorded if the pump is enabled.