__main__ now handles errors more transparently