Added some functionality for error identification