Added support for open with O_CREAT flag, using var args