Added additional error tracking