Documented the extremely complex checkforerrors method.