add _cleanup_closedir_
read /usr/lib/env.d