Improved code for updating the chroot environments: