fix error logging in datalayer