Updating script for terminal mode