add constructor
- refactor merge template class
- construct merged header based on already open files when merging bam files