Use traceback.format_exception_only to print error messages

Also, these errors are now printed on stderr rather than stdout.