Moved path getter to internal function