Reformed the output file issue