Add append mode for file Endpoints
Flush output endpoints before closing them
Do an insert during an update when searching fails