write in output file