fix to root only logging, and functions rename