Adding callback for failed connection