add function to trace haplotype
change warning to stderr
init Length statistics