Adding diagonostic logging messages during failure