added flag O_DIRECT only if corresponding option is specified