Should catch all errors and exceptions and be properly handled.
Merge pull request #1164 from coolhome/patch-2

Should catch all errors and exceptions and be properly handled.