add logging when there is an error