catch exceptions to avoid unexpected crash
Merge pull request #2 from bearprada/master_catch_exceptions

catch exceptions to avoid unexpected crash