Added prototype support for printing to a file.