added kill open process logic