Fixed bugs with __DIR__ and __METHOD__