Fixes for avalanche logging. Tmp commit.