Added top-level try/except block to clean up error reporting