better error tracking