Incorporate review feedback

- Replace spaces with underscores in bad index name.
- Close ProtoBuf PID after use.