made init() function of gen_server molderl_stream more robust to conection failure