allow defining dependencies for core twig extensions
move error logging logic