fixed output file name issue