change to log the exception.