added error examination