Add output function.