close logger when rotate