Add logs for error case