Adding updated script with chowning option