BUG: fix typo, add proper readconfig, add logging