Default problem with install new software

Hi all, I tried to install lastest miui to my HTC one but with no success, I not find any solution. Now I've got probelm with my HTC, because it has no rom, if I tried to flash any recovery its ok, but in recovery always are some errors, if I try to wipe I always see "Failed" on screen, also if I try to "adb sidelock".. it is impossible to sidelock any software to phone. Ill tried to flash genuine "RUU_M7_UL_JB_50_BrightstarUS_WWE_1.29.1540.3. exe" but also with no results.. Phone still is in bootloader without any software, please help my how to resolve my problem