Implemented errors handling.