improve logger handler