Debugged Tie error in PR File generation by refactoring code and changing double comparison technique