modify log class to make it better.