Fix bug where outFilename was not being reset to all null characters before re-use