added guards on term and logger
Merge branch 'master' into B-tree