replace raise with log message