fix typo and add log