Write setup script