Exists(t *testing.T) {  // save log output into buf for testing  var buf bytes.Buffer  log.SetOutput(&buf)  // mock and defer restore osStat  osStatOrig := osStat  defer func() {   log.SetOutput(os.Stderr)   osStat = osStatOrig  }()  