I'd write `on.exit(options(op))` to ensure it gets called even on error