Fixing logging and some distributor cleanup