This introduces a race condition between os.Stat and syscall.Unlink. Instead if you're trying to detect genuine errors in syscall.Unlink, you should do something like "if err != nil && !os.IsNotExist(err)"