Improve errors handling.