Actually it's a serious and important matter and perhaps we should have some discussion and/or "final decision" from Admins about it.
On one hand, using registry flag (both for caption and to decide into which folder file should be uploaded) is most logical, straightforward answer based on "formal" grounds.
On the other, until some +/-50 years ago registry flag and "actual operator country" were usually the same, at least for "respectable" operators, but nowadays, thanks to globalization with all it's pitfalls (like offshore tax heavens and the like) it means that majority of vessels, even those from "respectable" owners ("respectable large multinational corporation" LOL
) are registered under such flags (Panama, Liberia, Singapore, Marshall Islands) which makes the concept (for Shipbucket purposes) of sorting these ships by country somewhat pointless.
So I see the point of using the "operator country" (again, thanks to tax avoid... sorry, tax optimalization, the "operator company" can be registered on some Cayman Islands, Luxembourg or whatever, so I'd say "actual place of doing business") to decide, perhaps just with added line on caption "registered in Panama/Liberia/Cyprus...".