added O_CREAT option