Added pairfile parsing