implement handling logging