added upsert images check and commenting