fix restartwatcher
and log switch