Added plugin checking, and better checks