various fixes, finer grain logging