Default Kernel error message startup

Hello fellow M8 users, I would get a error message "unfortunately android system has stopped" every time I flash a custom kernel either on faux or elementalx. This is usually rom related but I am on rooted stock sense, s-off. I have a good backup copy of the rom before any changes but I would really like to get the benefits of a custom kernel without this message.

I am not running any overclock or undervolt. I think this is because I am running the ATT version of this phone but there are users who are running custom kernels with no issue. The only other thing I can think of is that I edited platform.xml to modify the WRITE_EXTERNAL_STORAGE permission so I can write to the ext sd card.

Anyone got any ideas for what I can do to get rid this message on startup?