Expand printf lines right before sending to print