Improving failure diagnosis via better design and analysis of log messages