Moving aggregation id log
Moving aggregation id log inside exists check