move MongoDB  delete function to output node as it's logically the end of a flow.