add fmode to do_open