I don't know if you can. What you can do is print out first to the screen and then print that to the file (or reverse order, it doesn't matter).