Return output instead of printing