Updated documentation and added logging.