Added printing to file