Considering The Key
Something to always be considering somewhere in your mind when writing a song is the key that you are in. I don't think it's as simple a rule as 'never play a note outside of that key' but it's something you want to be considering when the melodic elements don't all sit quite right together.