Fixed a minor bug in naming the output file.