You are not closing the XMLmode='dcrlocal'/>
I have done both in a TPL. That is supported. Have you tried each separately to verify each command works ?