Adding diagnostic messages