fix add_log method