step 4 output file