move path checker method to the package level