Better logging, fix typos