Add diagnostic code.