Split open and openmode

    Most open calls don't need the mode param. If you need it,
    use openmode.