Added better error handling
Merge branch 'develop'