Close the dialog after the r script finishes.

Remove the "overlapped genes" string in the output lines if there is no overlapped genes in the output.