added logger in case of exception