added synchronized block to ingest.