I think the flags are being ignored because you’re splitting the exec command over multiple lines without a \ at the end.
\