added monitoring of process shutdown after error (for 1 second)