Adding error trap
Merge branch 'develop'