Improved some exception handling to fail more gracefully