Added try and except statements to fix Issue #18
Merge pull request #24 from jbertino/iss18

Added try and except statements to fix Issue #18