Fix bug in _refresh_expiration that would cause sleeping a whole day before rotating the log