move goroutineID() inside the defer, guarded by !finished. It's safe — Goexit runs defers in the same goroutine, so the ID is stable.