Printing result to file