Xperia Z2 Won't install rom's This is my first time posting here, but I've used this a fair amount on previous phones to get root and rom's on.

I recently bought an Xperia Z2 online. I've spent the last few days trying to install cyanogenmod on the phone to no avail. Currently. So I'll outline the full process I'm using. I initially unlocked the phone using fastboot and sony official unlock method. I don't know fully if that carries over, or if it's problem if not. Then I flash on D6503_17.1.2.A.0.314_UK_Generic.ftf with the flashtools program. Using this video link https://www.youtube.com/watch?v=oEWheFGJRJ0, including all their specified files, I then root the phone, which is all fine. Then using another of his videos, https://www.youtube.com/watch?v=ubwdracEvyc , I install TWRP recovery, however his link is broken and I instead use the most updated zip file in the xzdualrecovery tab of nut.xperia-files.com/ . Downloading the latest xperia z2 nightly build from cyanogenmod website, I then load that onto the sd card, backup my system then do a full reset+wipe. It's here that I run into my erros. After clicking install from zip and selecting the CM12 nightly build, it begins running through the script and will then abort installation with the error 

"This build is for D6502, D6503.. Sirius; This phone is "Castor" 

Castor being the xperia z2 tablet. Loading on the Castor CM build will soft brick the phone and require a fresh restart from stock rom. 

Loading up CM12's script file and removing the checks for phone version, I then get the following script install problem with no error code or message.

Installing update...

E: installation aborted

I've tried this with another rom running into literally the same 2 issues.
Does anyone know what is going on and how I can fix it to install CM?
Alright, so I found the solution and it was all to do with my own incompetence.
I was flashing on the wrong recovery, instead of the recovery for the Xperia z2 I was putting on the Z2 tablet recovery. Hence why the recovery mode was detecting "Castor" instead of "Sirius". Flashing on the right recovery immediately solved my flashing problem and now I'm running CM12.