added check_error subroutine to check error ie compare u_gr and
u_ex