Need to get the second word of a specific text

Hi,

Let's assume that a text is like below:

Instance tr1 is running

I need to get the second word of the line (that is tr1) from the line where Instance tr1 is running.The line should not be

"Instance tr1 is not running."

.Where the word not comes I want to send the output to a file as a warning that tr1 is not running.Also help me how to redirect the errors from a command to a specific file.

Best regards,
Vishal

What you have tried so far ?