Add error and warning helper functions