address review comments (spacing, use of logging).