Simplify logic with path.join feeding the method