Added setter for script home and fixed null check