Improve Exception management