Error handling.
main loop modified
Merge branch 'claude_01' into claude