helps to print to files