now prints to file