logging modified to use log4go, some formatting changes (gofmt compatible)