CLN/ER: add BadDataError internal exception
CLN: just use standard open