Add aptMainLoop() for handling APT events in main()