code changes as per the code review for documentation and the logging messages.