Closes IPC files/connections on stop/exit/failure