Add the function to print content to a file.