fix javadoc, add logging to unlogged branches that might be taken in some cases