hijackPrint - hijack the print function for a function call, return printed contents