refactor: improve logging around internal book-keeping