error handling in gear script
Merge pull request #1802 from danmcp/master

Error handling in gear script