output exception message for logging