added error callback just in case