Updated require to use dirname()