Correction of the ouput file name bug