modified log module with using smart pointer