ESO: fixed logging in
Fixed null pointer exceptions. In Python.
fixed UnboundLocalError