Added error checking

Vivek, I tried this with Amber / Coco and it seems to work. Can you please
review and check with other tools?
Merge branch 'devel' of https://github.com/radical-cybertools/ExTASY into devel