working on output file