fix: move KeyboardInterrupt to main()