better logs for errors