Fix logging errors for user-agent test