Revided the ingest script to handle update gracefully