Update flagsToString to support multiple flags