fixed XAPID-862, make sure we log things properly, format code
4 files changed