Introduce a dedicated class to log exceptions