Question m919 help

hi.i need some help maybe someone can help me out.. i got a m919 s4 and i was having problems with the wifi running 4.4.2. phone was rooted. so i try installing stock rom on phone to remove the root access and maybe that would fix the wifi issue.. so i try loading the same firmware using odin 3.09 but it gave me error on write..i disconnected phone and turn it on but the phone gave me a screen telling me to connect the phone to kies for emergency recovery. i try doing that but kies doesnt see the phone..and everytime i try write thru odin i get failed to write.. any ideas....

ps i can only get into download mode and the screen telling me to connect to kies for recovery nothing else

os 4.4.2