modified error_check.pl