Check early for the existance of install directory
Full patch from earlier
Migrated to older syntax for redirection
Moved install successful outside loop