print result to file