message: cleanup threads if exception is thrown to prevent segfaults and cuda
  errors
diff: @@ -1578,6 +1578,7 @@ Thank you!\n";
  &outflex, &outfext, &nligs, &ligcount_final);
  + try {
  //loop over input ligands, adding them to the work queue
  for (unsigned l = 0, nl = ligand_names.size(); l < nl; l++)
  {
  @@ -1618,6 +1619,15 @@ Thank you!\n";
  break;
  }
  }
  + } catch (...)
  + {
  + //clean up threads before passing along exception
  + work_done = true;
  + worker_threads.join_all();
  + writer_thread.join();
  + cudaDeviceSynchronize();
  + throw;
  + }
  //join all the threads when their work is done
  work_done = true;
  