refactor & use proper logger