Engine issue

I bought my HL 850 not even a week ago and I haven’t even put 4 hours on it. Earlier today I went to start it and the check engine light came on and it wouldn’t start. I turned the key off then back on and the engine light had gone off and the bike started. But now It keeps back firing and is not running right at all. Any ideas other than making a warranty claim?