Adding error messages, fixing removed includes