worknig with output file