better logging plus a masterclient minor bug fix.
Merge branch 'master' into master-sonar