I am not even sure this routine (createIFileIO) is ever called/used anywhere except in datest.cpp ?  I suggest going back to getting mode flags only on  *nix and only when flushing is enabled.