replacing exception with log message