flush enforce after add
also flush enforce task if writing xml fails
locking issue resolved
includes
start enforce task if not exist