add error log on connection failure