Now using dirname(__FILE__) instead of __DIR__ to support older versions of PHP