task engine, fixed some insert audit debug problems