fix logging of errors