use __DIR__ instead of __FILE__ for simplicity

practically, `__DIR__` will not contain the trailing slash
so there is no need for `rtrim`.