added printing to a file