I don't think you want to cleanup ipc files *only* on restart.
I presume this should be outside the `else`.