Working onf print to file