Corrected output file name bug