alternative output filenames (corrections)

rebase the code from github fork sourcecode instead of codeproject