Troubleshooting agent and script issues