Anomaly handling: strategic flexibility in a complex problem-solving environment