follow some hlint advices
logging