Abstract filepathGet as its conditionaly in places