- Determine run mode automatically based on environment
- Debug log when automatic handling an error.