Fixed bug in output file name when the option --prefix is present