fix error logging statement