Updated api var, removed alert and replaced with trace