Log only states that change or error to improve readability