Updated for saving complete scripts