Detection of fouling in heat exchangers