Sampling process works gain.

The code used to write the output to a file, then use that file to display the result in the first pane. I've switched it to returning the string for the first pane.