add hist file detection