Fixed output filename bug.