added destroying method for the logger and called reset on shared_ptrs