move log_fh from per-function to a global variable with set_log call
missed a few more log_fh arguments
Add modifiable kmer flag