Improve errors management