logic fix for output name support