Print to file instead of console