updated error checking extension