rewrote this and RedirectCheck is the reusable class where RedirectCheckFile is the main program