move logger to utils
Add doctest