HTC One (M8) (CDMA)

Help: Recover deleted contacts on One M8

Yesterday, I flashed an new ROM to my HTC One M8 with CyanogenMod Installer app. I followed the exactly as a tutorial video did. But the process failed at the last step during ROM installation,maybe caused by some network error. When I powered on my device today, all of the data including phone contacts, SMS and media files were gone, like a factory rest.

Does anyone know how to get the data back? Is there any chance to successfully recover it? Thanks