Fixed output file generation...