parse output to file