addition of hidden states into log file every time they are updated.