updated guestbook example with logging