All I needed to do was change
strOutFilePath = txtOutputFile.Text;
to
strOutFileName = txtOutputFile.Text;
and that fixed my issue.
The problem was that the strOutFileName variable was null so it defaulted to the Debug folder.