update a wrong term
create the log dir if it not exists