tweak logging and more consistent/explicit usage of promises.