The return value `errflags` have three bits: 1, 2, 4. Can we make this a type of its own (instead of cryptic `int`)?