Add retry to connect and die when failed