Add more logging changes, and a few other reordering things. Also add loader fixes
Upstream merge