Updates to the tool and added logging.