moved the 'path' require to a higher level.