Minor fixes

* Fix a typo in `logging/logging.go`
* Refactor function `(*logging) filename()`
* Other minor code-style issues