added internal_key for managed dirs