added some logging to UserAgent