reintroduce open_flags