add more descriptive comments about how logging works