catch osexceptions where process has already stopped