Update ingest.py

added error-tolerant pid-requesting code