Log to server log when security terminals are broken

Adds #118 

I know its nit-picky but for future expansion, it is better to re-use twice or more often used fields and methods by binding them to variables. If you will get a NPE, it is easier to identify which variable had the NPE.

Same as variables down below