Use consistent require filename within function