Add user agent log; don't write anything until after the loop