Add diagnostic messages.