fixed bug in SelectFile, need to determine full output path