Added err callback variable