Removed use of __DIR__ and using kernel instead