Modified deploy script with EOF