added additional error tracking