Added _patch_DetermineFormat() function